Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Docs/admin-guide/mm/zswap: s/red-black tree/xarray/

The change from commit 796c2c23e14e ("zswap: replace RB tree with xarray")
is not reflected on the document. Update the document.

Link: https://lkml.kernel.org/r/20251003203851.43128-5-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Acked-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Acked-by: Nhat Pham <nphamcs@gmail.com>
Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Chris Li <chrisl@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

SeongJae Park and committed by
Andrew Morton
0fdaa13e 1f52f3de

+5 -5
+5 -5
Documentation/admin-guide/mm/zswap.rst
··· 59 59 accessed. The compressed memory pool grows on demand and shrinks as compressed 60 60 pages are freed. The pool is not preallocated. 61 61 62 - When a swap page is passed from swapout to zswap, zswap maintains a mapping 63 - of the swap entry, a combination of the swap type and swap offset, to the 64 - zsmalloc handle that references that compressed swap page. This mapping is 65 - achieved with a red-black tree per swap type. The swap offset is the search 66 - key for the tree nodes. 62 + When a swap page is passed from swapout to zswap, zswap maintains a mapping of 63 + the swap entry, a combination of the swap type and swap offset, to the zsmalloc 64 + handle that references that compressed swap page. This mapping is achieved 65 + with an xarray per swap type. The swap offset is the search key for the xarray 66 + nodes. 67 67 68 68 During a page fault on a PTE that is a swap entry, the swapin code calls the 69 69 zswap load function to decompress the page into the page allocated by the page