Lines Matching full:swap

22  * We use this to track usage of a cluster. A cluster is a block of swap disk
34 * elements corresponding to the swap cluster.
39 atomic_long_t __rcu *table; /* Swap table entries, see mm/swap_table.h */
67 * valid, and protect the swap device with reference count or locks.
103 * Nothing modifies swap cache in an IRQ context. All access to in __swap_cluster_lock()
104 * swap cache is wrapped by swap_cache_* helpers, and swap cache in __swap_cluster_lock()
108 * Besides, modifying swap cache requires synchronization with in __swap_cluster_lock()
121 * swap_cluster_lock - Lock and return the swap cluster of given offset.
122 * @si: swap device the cluster belongs to.
123 * @offset: the swap entry offset, pointing to a valid slot.
126 * protect the swap device with reference count or locks.
139 return __swap_cluster_lock(__swap_entry_to_info(folio->swap), in __swap_cluster_get_and_lock()
140 swp_offset(folio->swap), irq); in __swap_cluster_get_and_lock()
147 * This locks and returns the swap cluster that contains a folio's swap
148 * entries. The swap entries of a folio are always in one single cluster.
149 * The folio has to be locked so its swap entries won't change and the
152 * Context: Caller must ensure the folio is locked and in the swap cache.
153 * Return: Pointer to the swap cluster.
167 * Context: Caller must ensure the folio is locked and in the swap cache.
168 * Return: Pointer to the swap cluster.
208 * Return the swap device position of the swap entry.
216 * folio_matches_swap_entry - Check if a folio matches a given swap entry.
218 * @entry: The swap entry to check against.
221 * and nothing will move it in or out of the swap cache.
227 swp_entry_t folio_entry = folio->swap; in folio_matches_swap_entry()
238 * All swap cache helpers below require the caller to ensure the swap entries
241 * valid and increases the swap device's refcount.
242 * - Locking a folio in the swap cache: this ensures the folio's swap entries
244 * - Locking anything referencing the swap entry: e.g. PTL that protects
245 * swap entries in the page table, similar to locking swap cache folio.
252 /* Below helpers require the caller to lock and pass in the swap cluster. */
276 return __swap_entry_to_info(folio->swap)->flags; in folio_swap_flags()
280 * Return the count of contiguous swap entries that share the same
313 * be in conflict with the folio in swap cache. in non_swapcache_batch()
453 * For a folio which is either in the page cache or the swap cache,
464 return swp_offset(folio->swap); in folio_index()