Lines Matching refs:ci_off

179 	unsigned int ci_off = offset % SWAPFILE_CLUSTER;  in swap_only_has_cache()  local
180 unsigned int ci_end = ci_off + nr_pages; in swap_only_has_cache()
184 swp_tb = __swap_table_get(ci, ci_off); in swap_only_has_cache()
188 } while (++ci_off < ci_end); in swap_only_has_cache()
499 unsigned int ci_off, unsigned int nr, in swap_cluster_assert_empty() argument
502 unsigned int ci_end = ci_off + nr; in swap_cluster_assert_empty()
510 swp_tb = __swap_table_get(ci, ci_off); in swap_cluster_assert_empty()
515 WARN_ON_ONCE(__swap_cgroup_get(ci, ci_off)); in swap_cluster_assert_empty()
516 } while (++ci_off < ci_end); in swap_cluster_assert_empty()
791 unsigned int ci_off = offset % SWAPFILE_CLUSTER; in swap_cluster_setup_bad_slot() local
819 if (__swap_table_xchg(ci, ci_off, SWP_TB_BAD) != SWP_TB_NULL) { in swap_cluster_setup_bad_slot()
889 unsigned int ci_off = offset % SWAPFILE_CLUSTER; in cluster_scan_range() local
890 unsigned int ci_end = ci_off + nr_pages; in cluster_scan_range()
894 swp_tb = __swap_table_get(ci, ci_off); in cluster_scan_range()
906 } while (++ci_off < ci_end); in cluster_scan_range()
914 unsigned int ci_off) in __swap_cluster_alloc_entries() argument
936 swap_cluster_assert_empty(ci, ci_off, nr_pages, false); in __swap_cluster_alloc_entries()
938 ci_off + cluster_offset(si, ci))); in __swap_cluster_alloc_entries()
942 swap_cluster_assert_empty(ci, ci_off, 1, false); in __swap_cluster_alloc_entries()
944 __swap_table_set(ci, ci_off, __swp_tb_mk_count(shadow_to_swp_tb(NULL, 0), 1)); in __swap_cluster_alloc_entries()
1465 unsigned int ci_off, gfp_t gfp) in swap_extend_table_alloc() argument
1483 count = swp_tb_get_count(__swap_table_get(ci, ci_off)); in swap_extend_table_alloc()
1538 unsigned int ci_off) in __swap_cluster_put_entry() argument
1544 swp_tb = __swap_table_get(ci, ci_off); in __swap_cluster_put_entry()
1551 count = ci->extend_table[ci_off]; in __swap_cluster_put_entry()
1556 ci->extend_table[ci_off] = 0; in __swap_cluster_put_entry()
1557 __swap_table_set(ci, ci_off, __swp_tb_mk_count(swp_tb, count)); in __swap_cluster_put_entry()
1559 ci->extend_table[ci_off] = count; in __swap_cluster_put_entry()
1562 __swap_table_set(ci, ci_off, __swp_tb_mk_count(swp_tb, --count)); in __swap_cluster_put_entry()
1593 unsigned int ci_off, ci_end; in swap_put_entries_cluster() local
1601 ci_off = offset % SWAPFILE_CLUSTER; in swap_put_entries_cluster()
1602 ci_end = ci_off + nr; in swap_put_entries_cluster()
1604 swp_tb = __swap_table_get(ci, ci_off); in swap_put_entries_cluster()
1609 ci_batch = ci_off; in swap_put_entries_cluster()
1621 __swap_cluster_put_entry(ci, ci_off); in swap_put_entries_cluster()
1623 __swap_cluster_free_entries(si, ci, ci_batch, ci_off - ci_batch); in swap_put_entries_cluster()
1626 } while (++ci_off < ci_end); in swap_put_entries_cluster()
1629 __swap_cluster_free_entries(si, ci, ci_batch, ci_off - ci_batch); in swap_put_entries_cluster()
1646 unsigned int ci_off) in __swap_cluster_dup_entry() argument
1652 swp_tb = __swap_table_get(ci, ci_off); in __swap_cluster_dup_entry()
1662 __swap_table_set(ci, ci_off, __swp_tb_mk_count(swp_tb, count + 1)); in __swap_cluster_dup_entry()
1663 VM_WARN_ON_ONCE(ci->extend_table && ci->extend_table[ci_off]); in __swap_cluster_dup_entry()
1666 VM_WARN_ON_ONCE(ci->extend_table[ci_off]); in __swap_cluster_dup_entry()
1667 ci->extend_table[ci_off] = SWP_TB_COUNT_MAX; in __swap_cluster_dup_entry()
1668 __swap_table_set(ci, ci_off, __swp_tb_mk_count(swp_tb, SWP_TB_COUNT_MAX)); in __swap_cluster_dup_entry()
1673 VM_WARN_ON_ONCE(ci->extend_table[ci_off] >= in __swap_cluster_dup_entry()
1675 ++ci->extend_table[ci_off]; in __swap_cluster_dup_entry()
1700 unsigned int ci_start, ci_off, ci_end; in swap_dup_entries_cluster() local
1704 ci_off = ci_start; in swap_dup_entries_cluster()
1708 err = __swap_cluster_dup_entry(ci, ci_off); in swap_dup_entries_cluster()
1712 err = swap_extend_table_alloc(si, ci, ci_off, GFP_ATOMIC); in swap_dup_entries_cluster()
1719 } while (++ci_off < ci_end); in swap_dup_entries_cluster()
1723 while (ci_off-- > ci_start) in swap_dup_entries_cluster()
1724 __swap_cluster_put_entry(ci, ci_off); in swap_dup_entries_cluster()
1921 unsigned int ci_off = ci_start, ci_end = ci_start + nr_pages; in __swap_cluster_free_entries() local
1923 unsigned int batch_off = ci_off; in __swap_cluster_free_entries()
1929 old_tb = __swap_table_get(ci, ci_off); in __swap_cluster_free_entries()
1937 __swap_table_set(ci, ci_off, null_to_swp_tb()); in __swap_cluster_free_entries()
1939 __swap_table_clear_zero(ci, ci_off); in __swap_cluster_free_entries()
1945 id_cur = __swap_cgroup_clear(ci, ci_off, 1); in __swap_cluster_free_entries()
1948 mem_cgroup_uncharge_swap(batch_id, ci_off - batch_off); in __swap_cluster_free_entries()
1950 batch_off = ci_off; in __swap_cluster_free_entries()
1952 } while (++ci_off < ci_end); in __swap_cluster_free_entries()
1955 mem_cgroup_uncharge_swap(batch_id, ci_off - batch_off); in __swap_cluster_free_entries()
1969 unsigned int ci_off = swp_cluster_offset(entry); in __swap_count() local
1971 return swp_tb_get_count(__swap_table_get(ci, ci_off)); in __swap_count()
2033 unsigned int ci_off, ci_end; in folio_maybe_swapped() local
2040 ci_off = swp_cluster_offset(entry); in folio_maybe_swapped()
2041 ci_end = ci_off + folio_nr_pages(folio); in folio_maybe_swapped()
2048 if (__swp_tb_get_count(__swap_table_get(ci, ci_off))) { in folio_maybe_swapped()
2052 } while (++ci_off < ci_end); in folio_maybe_swapped()