@@ -49,7 +49,7 @@ compressed pool.
49
49
Design
50
50
======
51
51
52
- Zswap receives pages for compression through the Frontswap API and is able to
52
+ Zswap receives pages for compression from the swap subsystem and is able to
53
53
evict pages from its own compressed pool on an LRU basis and write them back to
54
54
the backing swap device in the case that the compressed pool is full.
55
55
@@ -70,19 +70,19 @@ means the compression ratio will always be 2:1 or worse (because of half-full
70
70
zbud pages). The zsmalloc type zpool has a more complex compressed page
71
71
storage method, and it can achieve greater storage densities.
72
72
73
- When a swap page is passed from frontswap to zswap, zswap maintains a mapping
73
+ When a swap page is passed from swapout to zswap, zswap maintains a mapping
74
74
of the swap entry, a combination of the swap type and swap offset, to the zpool
75
75
handle that references that compressed swap page. This mapping is achieved
76
76
with a red-black tree per swap type. The swap offset is the search key for the
77
77
tree nodes.
78
78
79
- During a page fault on a PTE that is a swap entry, frontswap calls the zswap
80
- load function to decompress the page into the page allocated by the page fault
81
- handler.
79
+ During a page fault on a PTE that is a swap entry, the swapin code calls the
80
+ zswap load function to decompress the page into the page allocated by the page
81
+ fault handler.
82
82
83
83
Once there are no PTEs referencing a swap page stored in zswap (i.e. the count
84
- in the swap_map goes to 0) the swap code calls the zswap invalidate function,
85
- via frontswap, to free the compressed entry.
84
+ in the swap_map goes to 0) the swap code calls the zswap invalidate function
85
+ to free the compressed entry.
86
86
87
87
Zswap seeks to be simple in its policies. Sysfs attributes allow for one user
88
88
controlled policy:
0 commit comments