Lines Matching refs:swap_map
401 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_cluster_schedule_discard()
438 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
593 if (!si->swap_map[tmp]) { in scan_swap_map_try_ssd_cluster()
739 if (si->swap_map[offset]) in scan_swap_map_slots()
779 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map_slots()
791 if (si->swap_map[offset]) { in scan_swap_map_slots()
798 si->swap_map[offset] = usage; in scan_swap_map_slots()
833 if (si->cluster_nr && !si->swap_map[offset]) { in scan_swap_map_slots()
845 if (!si->swap_map[offset]) { in scan_swap_map_slots()
849 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map_slots()
860 if (!si->swap_map[offset]) { in scan_swap_map_slots()
864 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map_slots()
906 map = si->swap_map + offset; in swap_alloc_cluster()
1089 if (!p->swap_map[swp_offset(entry)]) in _swap_info_get()
1133 count = p->swap_map[offset]; in __swap_entry_free_locked()
1158 p->swap_map[offset] = usage ? : SWAP_HAS_CACHE; in __swap_entry_free_locked()
1183 count = p->swap_map[offset]; in swap_entry_free()
1185 p->swap_map[offset] = 0; in swap_entry_free()
1229 map = si->swap_map + offset; in put_swap_page()
1331 count = swap_count(p->swap_map[offset]); in page_swapcount()
1341 return swap_count(si->swap_map[offset]); in __swap_count()
1351 count = swap_count(si->swap_map[offset]); in swap_swapcount()
1393 count = swap_count(p->swap_map[offset]); in swp_swapcount()
1400 page = vmalloc_to_page(p->swap_map + offset); in swp_swapcount()
1422 unsigned char *map = si->swap_map; in swap_page_trans_huge_swapped()
1492 map = si->swap_map; in page_trans_huge_map_swapcount()
1996 count = READ_ONCE(si->swap_map[i]); in find_next_to_unuse()
2019 volatile unsigned char *swap_map; /* swap_map is accessed without in try_to_unuse() local
2063 swap_map = &si->swap_map[i]; in try_to_unuse()
2074 swcount = *swap_map; in try_to_unuse()
2113 swcount = *swap_map; in try_to_unuse()
2124 if (swap_count(*swap_map)) { in try_to_unuse()
2125 int set_start_mm = (*swap_map >= swcount); in try_to_unuse()
2134 while (swap_count(*swap_map) && !retval && in try_to_unuse()
2145 swcount = *swap_map; in try_to_unuse()
2153 if (set_start_mm && *swap_map < swcount) { in try_to_unuse()
2191 if (swap_count(*swap_map) && in try_to_unuse()
2438 unsigned char *swap_map, in _enable_swap_info() argument
2462 p->swap_map = swap_map; in _enable_swap_info()
2484 unsigned char *swap_map, in enable_swap_info() argument
2491 _enable_swap_info(p, prio, swap_map, cluster_info); in enable_swap_info()
2500 _enable_swap_info(p, p->prio, p->swap_map, p->cluster_info); in reinsert_swap_info()
2519 unsigned char *swap_map; in SYSCALL_DEFINE1() local
2631 swap_map = p->swap_map; in SYSCALL_DEFINE1()
2632 p->swap_map = NULL; in SYSCALL_DEFINE1()
2643 vfree(swap_map); in SYSCALL_DEFINE1()
2712 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_start()
2734 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_next()
3002 unsigned char *swap_map, in setup_swap_map_and_extents() argument
3024 swap_map[page_nr] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
3039 swap_map[0] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
3107 unsigned char *swap_map = NULL; in SYSCALL_DEFINE2() local
3172 swap_map = vzalloc(maxpages); in SYSCALL_DEFINE2()
3173 if (!swap_map) { in SYSCALL_DEFINE2()
3225 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map, in SYSCALL_DEFINE2()
3276 enable_swap_info(p, prio, swap_map, cluster_info, frontswap_map); in SYSCALL_DEFINE2()
3308 vfree(swap_map); in SYSCALL_DEFINE2()
3384 count = p->swap_map[offset]; in __swap_duplicate()
3422 p->swap_map[offset] = count | has_cache; in __swap_duplicate()
3544 count = si->swap_map[offset] & ~SWAP_HAS_CACHE; in add_swap_count_continuation()
3566 head = vmalloc_to_page(si->swap_map + offset); in add_swap_count_continuation()
3633 head = vmalloc_to_page(si->swap_map + offset); in swap_count_continued()
3719 head = vmalloc_to_page(si->swap_map + offset); in free_swap_count_continuations()