Lines Matching full:swap

6 Swap Table
9 Swap table implements swap cache as a per-cluster swap cache value array.
11 Swap Entry
14 A swap entry contains the information required to serve the anonymous page
17 Swap entry is encoded as two parts: swap type and swap offset.
19 The swap type indicates which swap device to use.
20 The swap offset is the offset of the swap file to read the page data from.
22 Swap Cache
25 Swap cache is a map to look up folios using swap entry as the key. The result
26 value can have three possible types depending on which stage of this swap entry
29 1. NULL: This swap entry is not used.
31 2. folio: A folio has been allocated and bound to this swap entry. This is
32 the transient state of swap out or swap in. The folio data can be in
33 the folio or swap file, or both.
38 Swap Table Internals
41 The previous swap cache is implemented by XArray. The XArray is a tree
44 Notice that most of the time when we look up the swap cache, we are either
45 in a swap in or swap out path. We should already have the swap cluster,
46 which contains the swap entry.
48 If we have a per-cluster array to store swap cache value in the cluster.
49 Swap cache lookup within the cluster can be a very simple array lookup.
51 We give such a per-cluster swap cache value array a name: the swap table.
53 A swap table is an array of pointers. Each pointer is the same size as a
54 PTE. The size of a swap table for one swap cluster typically matches a PTE
57 With swap table, swap cache lookup can achieve great locality, simpler,
63 Swap table modification requires taking the cluster lock. If a folio
64 is being added to or removed from the swap table, the folio must be
68 Swap table lookup is protected by RCU and atomic read. If the lookup