Lines Matching refs:swap_map

449 	memset(si->swap_map + idx * SWAPFILE_CLUSTER,  in swap_cluster_schedule_discard()
486 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
641 if (!si->swap_map[tmp]) { in scan_swap_map_try_ssd_cluster()
787 if (si->swap_map[offset]) in scan_swap_map_slots()
827 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map_slots()
839 if (si->swap_map[offset]) { in scan_swap_map_slots()
846 si->swap_map[offset] = usage; in scan_swap_map_slots()
881 if (si->cluster_nr && !si->swap_map[offset]) { in scan_swap_map_slots()
893 if (!si->swap_map[offset]) { in scan_swap_map_slots()
897 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map_slots()
908 if (!si->swap_map[offset]) { in scan_swap_map_slots()
912 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map_slots()
954 map = si->swap_map + offset; in swap_alloc_cluster()
970 memset(si->swap_map + offset, 0, SWAPFILE_CLUSTER); in swap_free_cluster()
1140 if (!p->swap_map[swp_offset(entry)]) in _swap_info_get()
1184 count = p->swap_map[offset]; in __swap_entry_free_locked()
1209 p->swap_map[offset] = usage ? : SWAP_HAS_CACHE; in __swap_entry_free_locked()
1299 count = p->swap_map[offset]; in swap_entry_free()
1301 p->swap_map[offset] = 0; in swap_entry_free()
1343 map = si->swap_map + offset; in put_swap_page()
1442 count = swap_count(p->swap_map[offset]); in page_swapcount()
1456 count = swap_count(si->swap_map[offset]); in __swap_count()
1469 count = swap_count(si->swap_map[offset]); in swap_swapcount()
1513 count = swap_count(p->swap_map[offset]); in swp_swapcount()
1520 page = vmalloc_to_page(p->swap_map + offset); in swp_swapcount()
1542 unsigned char *map = si->swap_map; in swap_page_trans_huge_swapped()
1612 map = si->swap_map; in page_trans_huge_map_swapcount()
1920 volatile unsigned char *swap_map; in unuse_pte_range() local
1939 swap_map = &si->swap_map[offset]; in unuse_pte_range()
1945 if (*swap_map == 0 || *swap_map == SWAP_MAP_BAD) in unuse_pte_range()
2105 count = READ_ONCE(si->swap_map[i]); in find_next_to_unuse()
2422 unsigned char *swap_map, in setup_swap_info() argument
2446 p->swap_map = swap_map; in setup_swap_info()
2472 unsigned char *swap_map, in enable_swap_info() argument
2479 setup_swap_info(p, prio, swap_map, cluster_info); in enable_swap_info()
2498 setup_swap_info(p, p->prio, p->swap_map, p->cluster_info); in reinsert_swap_info()
2518 unsigned char *swap_map; in SYSCALL_DEFINE1() local
2641 swap_map = p->swap_map; in SYSCALL_DEFINE1()
2642 p->swap_map = NULL; in SYSCALL_DEFINE1()
2653 vfree(swap_map); in SYSCALL_DEFINE1()
2721 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_start()
2741 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_next()
3009 unsigned char *swap_map, in setup_swap_map_and_extents() argument
3031 swap_map[page_nr] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
3046 swap_map[0] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
3114 unsigned char *swap_map = NULL; in SYSCALL_DEFINE2() local
3179 swap_map = vzalloc(maxpages); in SYSCALL_DEFINE2()
3180 if (!swap_map) { in SYSCALL_DEFINE2()
3232 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map, in SYSCALL_DEFINE2()
3294 enable_swap_info(p, prio, swap_map, cluster_info, frontswap_map); in SYSCALL_DEFINE2()
3324 vfree(swap_map); in SYSCALL_DEFINE2()
3394 count = p->swap_map[offset]; in __swap_duplicate()
3432 p->swap_map[offset] = count | has_cache; in __swap_duplicate()
3553 count = si->swap_map[offset] & ~SWAP_HAS_CACHE; in add_swap_count_continuation()
3574 head = vmalloc_to_page(si->swap_map + offset); in add_swap_count_continuation()
3642 head = vmalloc_to_page(si->swap_map + offset); in swap_count_continued()
3728 head = vmalloc_to_page(si->swap_map + offset); in free_swap_count_continuations()