Lines Matching refs:SWAPFILE_CLUSTER
266 #define SWAPFILE_CLUSTER HPAGE_PMD_NR macro
270 #define SWAPFILE_CLUSTER 256 macro
357 ci += offset / SWAPFILE_CLUSTER; in lock_cluster()
461 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_cluster_schedule_discard()
462 SWAP_MAP_BAD, SWAPFILE_CLUSTER); in swap_cluster_schedule_discard()
492 discard_swap_cluster(si, idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
493 SWAPFILE_CLUSTER); in swap_do_scheduled_discard()
496 ci = lock_cluster(si, idx * SWAPFILE_CLUSTER); in swap_do_scheduled_discard()
498 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
499 0, SWAPFILE_CLUSTER); in swap_do_scheduled_discard()
558 unsigned long idx = page_nr / SWAPFILE_CLUSTER; in inc_cluster_info_page()
565 VM_BUG_ON(cluster_count(&cluster_info[idx]) >= SWAPFILE_CLUSTER); in inc_cluster_info_page()
578 unsigned long idx = page_nr / SWAPFILE_CLUSTER; in dec_cluster_info_page()
602 offset /= SWAPFILE_CLUSTER; in scan_swap_map_ssd_cluster_conflict()
632 SWAPFILE_CLUSTER; in scan_swap_map_try_ssd_cluster()
653 (cluster_next(&cluster->index) + 1) * SWAPFILE_CLUSTER); in scan_swap_map_try_ssd_cluster()
819 if (si->pages - si->inuse_pages < SWAPFILE_CLUSTER) { in scan_swap_map_slots()
820 si->cluster_nr = SWAPFILE_CLUSTER - 1; in scan_swap_map_slots()
833 last_in_cluster = offset + SWAPFILE_CLUSTER - 1; in scan_swap_map_slots()
838 last_in_cluster = offset + SWAPFILE_CLUSTER; in scan_swap_map_slots()
841 offset -= SWAPFILE_CLUSTER - 1; in scan_swap_map_slots()
843 si->cluster_nr = SWAPFILE_CLUSTER - 1; in scan_swap_map_slots()
854 si->cluster_nr = SWAPFILE_CLUSTER - 1; in scan_swap_map_slots()
1015 offset = idx * SWAPFILE_CLUSTER; in swap_alloc_cluster()
1018 cluster_set_count_flag(ci, SWAPFILE_CLUSTER, CLUSTER_FLAG_HUGE); in swap_alloc_cluster()
1020 memset(si->swap_map + offset, SWAP_HAS_CACHE, SWAPFILE_CLUSTER); in swap_alloc_cluster()
1022 swap_range_alloc(si, offset, SWAPFILE_CLUSTER); in swap_alloc_cluster()
1030 unsigned long offset = idx * SWAPFILE_CLUSTER; in swap_free_cluster()
1034 memset(si->swap_map + offset, 0, SWAPFILE_CLUSTER); in swap_free_cluster()
1038 swap_range_free(si, offset, SWAPFILE_CLUSTER); in swap_free_cluster()
1050 WARN_ON_ONCE(n_goal > 1 && size == SWAPFILE_CLUSTER); in get_swap_pages()
1087 if (size == SWAPFILE_CLUSTER) { in get_swap_pages()
1094 if (n_ret || size == SWAPFILE_CLUSTER) in get_swap_pages()
1354 unsigned long idx = offset / SWAPFILE_CLUSTER; in put_swap_page()
1367 if (size == SWAPFILE_CLUSTER) { in put_swap_page()
1370 for (i = 0; i < SWAPFILE_CLUSTER; i++) { in put_swap_page()
1377 if (free_entries == SWAPFILE_CLUSTER) { in put_swap_page()
1380 mem_cgroup_uncharge_swap(entry, SWAPFILE_CLUSTER); in put_swap_page()
1570 unsigned long offset = round_down(roffset, SWAPFILE_CLUSTER); in swap_page_trans_huge_swapped()
1580 for (i = 0; i < SWAPFILE_CLUSTER; i++) { in swap_page_trans_huge_swapped()
3036 DIV_ROUND_UP(SWAP_ADDRESS_SPACE_PAGES, SWAPFILE_CLUSTER)
3050 unsigned long nr_clusters = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); in setup_swap_map_and_extents()
3051 unsigned long col = p->cluster_next / SWAPFILE_CLUSTER % SWAP_CLUSTER_COLS; in setup_swap_map_and_extents()
3075 for (i = maxpages; i < round_up(maxpages, SWAPFILE_CLUSTER); i++) in setup_swap_map_and_extents()
3257 nr_cluster = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); in SYSCALL_DEFINE2()