Lines Matching refs:SWAPFILE_CLUSTER
181 unsigned int ci_off = offset % SWAPFILE_CLUSTER; in swap_only_has_cache()
414 return cluster_index(si, ci) * SWAPFILE_CLUSTER; in cluster_offset()
457 for (ci_off = 0; ci_off < SWAPFILE_CLUSTER; ci_off++) in swap_cluster_free_table()
631 discard_swap_cluster(si, idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
632 SWAPFILE_CLUSTER); in swap_do_scheduled_discard()
697 VM_BUG_ON(!ci->count || ci->count == SWAPFILE_CLUSTER); in partial_free_cluster()
722 } else if (ci->count != SWAPFILE_CLUSTER) { in relocate_cluster()
741 unsigned long idx = offset / SWAPFILE_CLUSTER; in swap_cluster_setup_bad_slot()
755 WARN_ON(ci->count > SWAPFILE_CLUSTER); in swap_cluster_setup_bad_slot()
779 swp_tb = swap_table_get(ci, offset % SWAPFILE_CLUSTER); in cluster_reclaim_range()
806 swp_tb = __swap_table_get(ci, offset % SWAPFILE_CLUSTER); in cluster_reclaim_range()
829 swp_tb = __swap_table_get(ci, offset % SWAPFILE_CLUSTER); in cluster_scan_range()
851 unsigned int ci_off = start % SWAPFILE_CLUSTER; in swap_cluster_assert_table_empty()
919 unsigned long start = ALIGN_DOWN(offset, SWAPFILE_CLUSTER); in alloc_swap_scan_cluster()
920 unsigned long end = min(start + SWAPFILE_CLUSTER, si->max); in alloc_swap_scan_cluster()
928 if (end < nr_pages || ci->count + nr_pages > SWAPFILE_CLUSTER) in alloc_swap_scan_cluster()
949 if (ci->count < SWAPFILE_CLUSTER && offset <= end) in alloc_swap_scan_cluster()
996 to_scan = swap_usage_in_pages(si) / SWAPFILE_CLUSTER; in swap_reclaim_full_clusters()
1000 end = min(si->max, offset + SWAPFILE_CLUSTER); in swap_reclaim_full_clusters()
1005 swp_tb_is_folio(swap_table_get(ci, offset % SWAPFILE_CLUSTER))) { in swap_reclaim_full_clusters()
1440 swp_tb = __swap_table_get(ci, offset % SWAPFILE_CLUSTER); in swap_put_entries_cluster()
1513 if (size > SWAPFILE_CLUSTER) { in folio_alloc_swap()
1619 if (!count && !swp_tb_is_folio(__swap_table_get(ci, offset % SWAPFILE_CLUSTER))) in swap_put_entry_locked()
1917 cluster_end = min(round_up(offset + 1, SWAPFILE_CLUSTER), end_offset); in swap_put_entries_direct()
2384 i % SWAPFILE_CLUSTER); in find_next_to_unuse()
2715 unsigned long end = ALIGN(si->max, SWAPFILE_CLUSTER); in wait_for_allocation()
2720 for (offset = 0; offset < end; offset += SWAPFILE_CLUSTER) { in wait_for_allocation()
2730 int i, nr_clusters = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); in free_cluster_info()
3255 unsigned long nr_clusters = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); in setup_clusters()
3295 for (i = maxpages; i < round_up(maxpages, SWAPFILE_CLUSTER); i++) { in setup_clusters()
3620 !swp_tb_is_folio(__swap_table_get(ci, offset % SWAPFILE_CLUSTER)))) in swap_dup_entries()
3659 VM_WARN_ON(nr > SWAPFILE_CLUSTER - offset % SWAPFILE_CLUSTER); in __swap_duplicate()