Lines Matching refs:swap_map
468 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_cluster_schedule_discard()
505 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
664 if (!si->swap_map[tmp]) in scan_swap_map_try_ssd_cluster()
786 if (data_race(!si->swap_map[offset])) { in swap_offset_available_and_locked()
791 if (vm_swap_full() && READ_ONCE(si->swap_map[offset]) == SWAP_HAS_CACHE) { in swap_offset_available_and_locked()
857 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()
909 if (si->swap_map[offset]) { in scan_swap_map_slots()
916 WRITE_ONCE(si->swap_map[offset], usage); in scan_swap_map_slots()
943 } else if (si->cluster_nr && !si->swap_map[++offset]) { in scan_swap_map_slots()
963 if (!si->swap_map[offset]) in scan_swap_map_slots()
1026 memset(si->swap_map + offset, SWAP_HAS_CACHE, SWAPFILE_CLUSTER); in swap_alloc_cluster()
1040 memset(si->swap_map + offset, 0, SWAPFILE_CLUSTER); in swap_free_cluster()
1146 if (data_race(!p->swap_map[swp_offset(entry)])) in _swap_info_get()
1188 count = p->swap_map[offset]; in __swap_entry_free_locked()
1214 WRITE_ONCE(p->swap_map[offset], usage); in __swap_entry_free_locked()
1216 WRITE_ONCE(p->swap_map[offset], SWAP_HAS_CACHE); in __swap_entry_free_locked()
1314 count = p->swap_map[offset]; in swap_entry_free()
1316 p->swap_map[offset] = 0; in swap_entry_free()
1358 map = si->swap_map + offset; in put_swap_folio()
1444 return swap_count(si->swap_map[offset]); in __swap_count()
1459 count = swap_count(si->swap_map[offset]); in swap_swapcount()
1485 count = swap_count(p->swap_map[offset]); in swp_swapcount()
1492 page = vmalloc_to_page(p->swap_map + offset); in swp_swapcount()
1514 unsigned char *map = si->swap_map; in swap_page_trans_huge_swapped()
1882 swp_count = READ_ONCE(si->swap_map[offset]); in unuse_pte_range()
2025 count = READ_ONCE(si->swap_map[i]); in find_next_to_unuse()
2293 unsigned char *swap_map, in setup_swap_info() argument
2317 p->swap_map = swap_map; in setup_swap_info()
2346 unsigned char *swap_map, in enable_swap_info() argument
2353 setup_swap_info(p, prio, swap_map, cluster_info); in enable_swap_info()
2371 setup_swap_info(p, p->prio, p->swap_map, p->cluster_info); in reinsert_swap_info()
2391 unsigned char *swap_map; in SYSCALL_DEFINE1() local
2513 swap_map = p->swap_map; in SYSCALL_DEFINE1()
2514 p->swap_map = NULL; in SYSCALL_DEFINE1()
2526 vfree(swap_map); in SYSCALL_DEFINE1()
2593 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_start()
2614 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_next()
2899 unsigned char *swap_map, in setup_swap_map_and_extents() argument
2921 swap_map[page_nr] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
2936 swap_map[0] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
2991 unsigned char *swap_map = NULL; in SYSCALL_DEFINE2() local
3065 swap_map = vzalloc(maxpages); in SYSCALL_DEFINE2()
3066 if (!swap_map) { in SYSCALL_DEFINE2()
3126 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map, in SYSCALL_DEFINE2()
3184 enable_swap_info(p, prio, swap_map, cluster_info); in SYSCALL_DEFINE2()
3220 vfree(swap_map); in SYSCALL_DEFINE2()
3282 count = p->swap_map[offset]; in __swap_duplicate()
3320 WRITE_ONCE(p->swap_map[offset], count | has_cache); in __swap_duplicate()
3451 count = swap_count(si->swap_map[offset]); in add_swap_count_continuation()
3467 head = vmalloc_to_page(si->swap_map + offset); in add_swap_count_continuation()
3535 head = vmalloc_to_page(si->swap_map + offset); in swap_count_continued()
3617 head = vmalloc_to_page(si->swap_map + offset); in free_swap_count_continuations()