* Re: [PATCH 4/4] Docs/admin-guide/mm/zswap: s/red-black tree/xarray/
2025-10-03 20:38 ` [PATCH 4/4] Docs/admin-guide/mm/zswap: s/red-black tree/xarray/ SeongJae Park
@ 2025-10-07 23:42 ` Yosry Ahmed
2025-10-08 15:48 ` Nhat Pham
2025-10-09 3:03 ` Chengming Zhou
2 siblings, 0 replies; 5+ messages in thread
From: Yosry Ahmed @ 2025-10-07 23:42 UTC (permalink / raw)
To: SeongJae Park
Cc: Liam R. Howlett, Andrew Morton, Chengming Zhou, David Hildenbrand,
Johannes Weiner, Jonathan Corbet, Lorenzo Stoakes, Michal Hocko,
Mike Rapoport, Nhat Pham, Suren Baghdasaryan, Vlastimil Babka,
kernel-team, linux-doc, linux-kernel, linux-mm
On Fri, Oct 03, 2025 at 01:38:51PM -0700, SeongJae Park wrote:
> The change from commit 796c2c23e14e ("zswap: replace RB tree with
> xarray") is not reflected on the document. Update the document.
>
> Signed-off-by: SeongJae Park <sj@kernel.org>
Acked-by: Yosry Ahmed <yosry.ahmed@linux.dev>
> ---
> Documentation/admin-guide/mm/zswap.rst | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/admin-guide/mm/zswap.rst b/Documentation/admin-guide/mm/zswap.rst
> index 283d77217c6f..2464425c783d 100644
> --- a/Documentation/admin-guide/mm/zswap.rst
> +++ b/Documentation/admin-guide/mm/zswap.rst
> @@ -59,11 +59,11 @@ returned by the allocation routine and that handle must be mapped before being
> accessed. The compressed memory pool grows on demand and shrinks as compressed
> pages are freed. The pool is not preallocated.
>
> -When a swap page is passed from swapout to zswap, zswap maintains a mapping
> -of the swap entry, a combination of the swap type and swap offset, to the
> -zsmalloc handle that references that compressed swap page. This mapping is
> -achieved with a red-black tree per swap type. The swap offset is the search
> -key for the tree nodes.
> +When a swap page is passed from swapout to zswap, zswap maintains a mapping of
> +the swap entry, a combination of the swap type and swap offset, to the zsmalloc
> +handle that references that compressed swap page. This mapping is achieved
> +with an xarray per swap type. The swap offset is the search key for the xarray
> +nodes.
>
> During a page fault on a PTE that is a swap entry, the swapin code calls the
> zswap load function to decompress the page into the page allocated by the page
> --
> 2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 4/4] Docs/admin-guide/mm/zswap: s/red-black tree/xarray/
2025-10-03 20:38 ` [PATCH 4/4] Docs/admin-guide/mm/zswap: s/red-black tree/xarray/ SeongJae Park
2025-10-07 23:42 ` Yosry Ahmed
@ 2025-10-08 15:48 ` Nhat Pham
2025-10-09 3:03 ` Chengming Zhou
2 siblings, 0 replies; 5+ messages in thread
From: Nhat Pham @ 2025-10-08 15:48 UTC (permalink / raw)
To: SeongJae Park
Cc: Liam R. Howlett, Andrew Morton, Chengming Zhou, David Hildenbrand,
Johannes Weiner, Jonathan Corbet, Lorenzo Stoakes, Michal Hocko,
Mike Rapoport, Suren Baghdasaryan, Vlastimil Babka, Yosry Ahmed,
kernel-team, linux-doc, linux-kernel, linux-mm
On Fri, Oct 3, 2025 at 1:38 PM SeongJae Park <sj@kernel.org> wrote:
>
> The change from commit 796c2c23e14e ("zswap: replace RB tree with
> xarray") is not reflected on the document. Update the document.
>
> Signed-off-by: SeongJae Park <sj@kernel.org>
> ---
> Documentation/admin-guide/mm/zswap.rst | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/admin-guide/mm/zswap.rst b/Documentation/admin-guide/mm/zswap.rst
> index 283d77217c6f..2464425c783d 100644
> --- a/Documentation/admin-guide/mm/zswap.rst
> +++ b/Documentation/admin-guide/mm/zswap.rst
> @@ -59,11 +59,11 @@ returned by the allocation routine and that handle must be mapped before being
> accessed. The compressed memory pool grows on demand and shrinks as compressed
> pages are freed. The pool is not preallocated.
>
> -When a swap page is passed from swapout to zswap, zswap maintains a mapping
> -of the swap entry, a combination of the swap type and swap offset, to the
> -zsmalloc handle that references that compressed swap page. This mapping is
> -achieved with a red-black tree per swap type. The swap offset is the search
> -key for the tree nodes.
> +When a swap page is passed from swapout to zswap, zswap maintains a mapping of
> +the swap entry, a combination of the swap type and swap offset, to the zsmalloc
> +handle that references that compressed swap page. This mapping is achieved
> +with an xarray per swap type. The swap offset is the search key for the xarray
> +nodes.
>
Acked-by: Nhat Pham <nphamcs@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 4/4] Docs/admin-guide/mm/zswap: s/red-black tree/xarray/
2025-10-03 20:38 ` [PATCH 4/4] Docs/admin-guide/mm/zswap: s/red-black tree/xarray/ SeongJae Park
2025-10-07 23:42 ` Yosry Ahmed
2025-10-08 15:48 ` Nhat Pham
@ 2025-10-09 3:03 ` Chengming Zhou
2 siblings, 0 replies; 5+ messages in thread
From: Chengming Zhou @ 2025-10-09 3:03 UTC (permalink / raw)
To: SeongJae Park
Cc: Liam R. Howlett, Andrew Morton, David Hildenbrand,
Johannes Weiner, Jonathan Corbet, Lorenzo Stoakes, Michal Hocko,
Mike Rapoport, Nhat Pham, Suren Baghdasaryan, Vlastimil Babka,
Yosry Ahmed, kernel-team, linux-doc, linux-kernel, linux-mm
On 2025/10/4 04:38, SeongJae Park wrote:
> The change from commit 796c2c23e14e ("zswap: replace RB tree with
> xarray") is not reflected on the document. Update the document.
>
> Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev>
> ---
> Documentation/admin-guide/mm/zswap.rst | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/admin-guide/mm/zswap.rst b/Documentation/admin-guide/mm/zswap.rst
> index 283d77217c6f..2464425c783d 100644
> --- a/Documentation/admin-guide/mm/zswap.rst
> +++ b/Documentation/admin-guide/mm/zswap.rst
> @@ -59,11 +59,11 @@ returned by the allocation routine and that handle must be mapped before being
> accessed. The compressed memory pool grows on demand and shrinks as compressed
> pages are freed. The pool is not preallocated.
>
> -When a swap page is passed from swapout to zswap, zswap maintains a mapping
> -of the swap entry, a combination of the swap type and swap offset, to the
> -zsmalloc handle that references that compressed swap page. This mapping is
> -achieved with a red-black tree per swap type. The swap offset is the search
> -key for the tree nodes.
> +When a swap page is passed from swapout to zswap, zswap maintains a mapping of
> +the swap entry, a combination of the swap type and swap offset, to the zsmalloc
> +handle that references that compressed swap page. This mapping is achieved
> +with an xarray per swap type. The swap offset is the search key for the xarray
> +nodes.
>
> During a page fault on a PTE that is a swap entry, the swapin code calls the
> zswap load function to decompress the page into the page allocated by the page
^ permalink raw reply [flat|nested] 5+ messages in thread