Lines Matching refs:swap_map

267 	memset(si->swap_map + idx * SWAPFILE_CLUSTER,  in swap_cluster_schedule_discard()
325 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
472 if (!si->swap_map[tmp]) { in scan_swap_map_try_ssd_cluster()
534 if (si->swap_map[offset]) in scan_swap_map()
567 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map()
578 if (si->swap_map[offset]) in scan_swap_map()
593 si->swap_map[offset] = usage; in scan_swap_map()
603 if (!si->swap_map[offset]) { in scan_swap_map()
607 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map()
618 if (!si->swap_map[offset]) { in scan_swap_map()
622 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map()
741 if (!p->swap_map[offset]) in swap_info_get()
768 count = p->swap_map[offset]; in swap_entry_free()
795 p->swap_map[offset] = usage; in swap_entry_free()
871 count = swap_count(p->swap_map[swp_offset(entry)]); in page_swapcount()
1315 count = READ_ONCE(si->swap_map[i]); in find_next_to_unuse()
1335 volatile unsigned char *swap_map; /* swap_map is accessed without in try_to_unuse() local
1379 swap_map = &si->swap_map[i]; in try_to_unuse()
1390 swcount = *swap_map; in try_to_unuse()
1429 swcount = *swap_map; in try_to_unuse()
1440 if (swap_count(*swap_map)) { in try_to_unuse()
1441 int set_start_mm = (*swap_map >= swcount); in try_to_unuse()
1450 while (swap_count(*swap_map) && !retval && in try_to_unuse()
1461 swcount = *swap_map; in try_to_unuse()
1469 if (set_start_mm && *swap_map < swcount) { in try_to_unuse()
1507 if (swap_count(*swap_map) && in try_to_unuse()
1744 unsigned char *swap_map, in _enable_swap_info() argument
1757 p->swap_map = swap_map; in _enable_swap_info()
1781 unsigned char *swap_map, in enable_swap_info() argument
1788 _enable_swap_info(p, prio, swap_map, cluster_info); in enable_swap_info()
1797 _enable_swap_info(p, p->prio, p->swap_map, p->cluster_info); in reinsert_swap_info()
1805 unsigned char *swap_map; in SYSCALL_DEFINE1() local
1907 swap_map = p->swap_map; in SYSCALL_DEFINE1()
1908 p->swap_map = NULL; in SYSCALL_DEFINE1()
1919 vfree(swap_map); in SYSCALL_DEFINE1()
1987 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_start()
2009 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_next()
2248 unsigned char *swap_map, in setup_swap_map_and_extents() argument
2271 swap_map[page_nr] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
2286 swap_map[0] = SWAP_MAP_BAD; in setup_swap_map_and_extents()
2358 unsigned char *swap_map = NULL; in SYSCALL_DEFINE2() local
2430 swap_map = vzalloc(maxpages); in SYSCALL_DEFINE2()
2431 if (!swap_map) { in SYSCALL_DEFINE2()
2465 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map, in SYSCALL_DEFINE2()
2510 enable_swap_info(p, prio, swap_map, cluster_info, frontswap_map); in SYSCALL_DEFINE2()
2543 vfree(swap_map); in SYSCALL_DEFINE2()
2613 count = p->swap_map[offset]; in __swap_duplicate()
2651 p->swap_map[offset] = count | has_cache; in __swap_duplicate()
2767 count = si->swap_map[offset] & ~SWAP_HAS_CACHE; in add_swap_count_continuation()
2788 head = vmalloc_to_page(si->swap_map + offset); in add_swap_count_continuation()
2849 head = vmalloc_to_page(si->swap_map + offset); in swap_count_continued()
2929 head = vmalloc_to_page(si->swap_map + offset); in free_swap_count_continuations()