Lines Matching refs:swap_map
460 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_cluster_schedule_discard()
497 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
656 if (!si->swap_map[tmp]) in scan_swap_map_try_ssd_cluster()
835 if (si->swap_map[offset]) in scan_swap_map_slots()
875 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map_slots()
887 if (si->swap_map[offset]) { in scan_swap_map_slots()
894 WRITE_ONCE(si->swap_map[offset], usage); in scan_swap_map_slots()
921 } else if (si->cluster_nr && !si->swap_map[++offset]) { in scan_swap_map_slots()
941 if (!si->swap_map[offset]) in scan_swap_map_slots()
954 if (data_race(!si->swap_map[offset])) { in scan_swap_map_slots()
959 READ_ONCE(si->swap_map[offset]) == SWAP_HAS_CACHE) { in scan_swap_map_slots()
971 if (data_race(!si->swap_map[offset])) { in scan_swap_map_slots()
976 READ_ONCE(si->swap_map[offset]) == SWAP_HAS_CACHE) { in scan_swap_map_slots()
1018 memset(si->swap_map + offset, SWAP_HAS_CACHE, SWAPFILE_CLUSTER); in swap_alloc_cluster()
1032 memset(si->swap_map + offset, 0, SWAPFILE_CLUSTER); in swap_free_cluster()
1160 if (data_race(!p->swap_map[swp_offset(entry)])) in _swap_info_get()
1203 count = p->swap_map[offset]; in __swap_entry_free_locked()
1229 WRITE_ONCE(p->swap_map[offset], usage); in __swap_entry_free_locked()
1231 WRITE_ONCE(p->swap_map[offset], SWAP_HAS_CACHE); in __swap_entry_free_locked()
1322 count = p->swap_map[offset]; in swap_entry_free()
1324 p->swap_map[offset] = 0; in swap_entry_free()
1366 map = si->swap_map + offset; in put_swap_page()
1465 count = swap_count(p->swap_map[offset]); in page_swapcount()
1479 count = swap_count(si->swap_map[offset]); in __swap_count()
1492 count = swap_count(si->swap_map[offset]); in swap_swapcount()
1536 count = swap_count(p->swap_map[offset]); in swp_swapcount()
1543 page = vmalloc_to_page(p->swap_map + offset); in swp_swapcount()
1565 unsigned char *map = si->swap_map; in swap_page_trans_huge_swapped()
1635 map = si->swap_map; in page_trans_huge_map_swapcount()
1949 volatile unsigned char *swap_map; in unuse_pte_range() local
1966 swap_map = &si->swap_map[offset]; in unuse_pte_range()
1979 if (*swap_map == 0 || *swap_map == SWAP_MAP_BAD) in unuse_pte_range()
2139 count = READ_ONCE(si->swap_map[i]); in find_next_to_unuse()
2426 unsigned char *swap_map, in setup_swap_info() argument
2450 p->swap_map = swap_map; in setup_swap_info()
2476 unsigned char *swap_map, in enable_swap_info() argument
2483 setup_swap_info(p, prio, swap_map, cluster_info); in enable_swap_info()
2501 setup_swap_info(p, p->prio, p->swap_map, p->cluster_info); in reinsert_swap_info()
2521 unsigned char *swap_map; in SYSCALL_DEFINE1() local
2644 swap_map = p->swap_map; in SYSCALL_DEFINE1()
2645 p->swap_map = NULL; in SYSCALL_DEFINE1()
2659 vfree(swap_map); in SYSCALL_DEFINE1()
2727 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_start()
2748 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_next()
3034 unsigned char *swap_map, in setup_swap_map_and_extents() argument
3056 swap_map[page_nr] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
3071 swap_map[0] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
3140 unsigned char *swap_map = NULL; in SYSCALL_DEFINE2() local
3215 swap_map = vzalloc(maxpages); in SYSCALL_DEFINE2()
3216 if (!swap_map) { in SYSCALL_DEFINE2()
3276 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map, in SYSCALL_DEFINE2()
3338 enable_swap_info(p, prio, swap_map, cluster_info, frontswap_map); in SYSCALL_DEFINE2()
3375 vfree(swap_map); in SYSCALL_DEFINE2()
3440 count = p->swap_map[offset]; in __swap_duplicate()
3478 WRITE_ONCE(p->swap_map[offset], count | has_cache); in __swap_duplicate()
3598 count = swap_count(si->swap_map[offset]); in add_swap_count_continuation()
3619 head = vmalloc_to_page(si->swap_map + offset); in add_swap_count_continuation()
3687 head = vmalloc_to_page(si->swap_map + offset); in swap_count_continued()
3769 head = vmalloc_to_page(si->swap_map + offset); in free_swap_count_continuations()