From: Alex Shi <seakeel@gmail.com>
To: alexs@kernel.org, Vitaly Wool <vitaly.wool@konsulko.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
minchan@kernel.org, willy@infradead.org,
senozhatsky@chromium.org, david@redhat.com, 42.hyeyoo@gmail.com
Subject: Re: [PATCH 00/15] add zpdesc memory descriptor for zswap.zpool
Date: Fri, 21 Jun 2024 14:43:59 +0800 [thread overview]
Message-ID: <15ee2753-a3f6-4b41-8afa-344ce9154161@gmail.com> (raw)
In-Reply-To: <20240621054658.1220796-1-alexs@kernel.org>
On 6/21/24 1:46 PM, alexs@kernel.org wrote:
> From: Alex Shi <alexs@kernel.org>
>
> According to Metthew's plan, the page descriptor will be replace by a 8
> bytes mem_desc on destination purpose.
> https://lore.kernel.org/lkml/YvV1KTyzZ+Jrtj9x@casper.infradead.org/
>
> Here is a implement on z3fold to replace page descriptor by zpdesc,
> which is still overlay on struct page now. but it's a step move forward
> above destination.
>
> To name the struct zpdesc instead of z3fold_desc, since there are 3 zpool
> usages under zswap, zbud, z3fold, zsmalloc. It looks like we may extend the
> zpdesc to zbud and zsmalloc, combined their usage into one.
BTW,
Thanks for David and Willy's suggestion!
Since all zpool candidates are single page users, then we could use zpdesc to
descript them all in future.
Thanks
>
> For zpdesc(page), z3fold just uses the 5th member zppage_flag, which
> match with page.private. Potentially uses the first member flags for
> headless PG_locked, list_head lru and page.mapping|PAGE_MAPPING_MOVABLE
> for page migration.>
> This patachset could save 26Kbyetes z3fold.o size, basely saving come
> from the page to folio conversion.
>
> Thanks a lot!
> Alex
>
> Alex Shi (15):
> mm/z3fold: add zpdesc struct and helper and use them in
> z3fold_page_isolate
> mm/z3fold: use zpdesc in z3fold_page_migrate
> mm/z3fold: use zpdesc in z3fold_page_putback
> mm/z3fold: use zpdesc in get/put_z3fold_header funcs
> mm/z3fold: use zpdesc in init_z3fold_page
> mm/z3fold: use zpdesc in free_z3fold_page
> mm/z3fold: convert page to zpdesc in __release_z3fold_page
> mm/z3fold: use zpdesc free_pages_work
> mm/z3fold: use zpdesc in z3fold_compact_page and do_compact_page
> mm/z3fold: use zpdesc in __z3fold_alloc
> mm/z3fold: use zpdesc in z3fold_alloc
> mm/z3fold: use zpdesc in free_z3fold_page and z3fold_free
> mm/z3fold: use zpdesc in z3fold_map/z3fold_unmap
> mm/z3fold: introduce __zpdesc_set_movable
> mm/z3fold: introduce __zpdesc_clear_movable
>
> mm/z3fold.c | 190 +++++++++++++++++++++++++++-------------------------
> mm/zpdesc.h | 87 ++++++++++++++++++++++++
> 2 files changed, 184 insertions(+), 93 deletions(-)
> create mode 100644 mm/zpdesc.h
>
next prev parent reply other threads:[~2024-06-21 6:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 5:46 [PATCH 00/15] add zpdesc memory descriptor for zswap.zpool alexs
2024-06-21 5:46 ` [PATCH 01/15] mm/z3fold: add zpdesc struct and helper and use them in z3fold_page_isolate alexs
2024-06-21 5:46 ` [PATCH 02/15] mm/z3fold: use zpdesc in z3fold_page_migrate alexs
2024-06-21 5:46 ` [PATCH 03/15] mm/z3fold: use zpdesc in z3fold_page_putback alexs
2024-06-21 5:46 ` [PATCH 04/15] mm/z3fold: use zpdesc in get/put_z3fold_header funcs alexs
2024-06-21 5:46 ` [PATCH 05/15] mm/z3fold: use zpdesc in init_z3fold_page alexs
2024-06-21 5:46 ` [PATCH 06/15] mm/z3fold: use zpdesc in free_z3fold_page alexs
2024-06-21 5:46 ` [PATCH 07/15] mm/z3fold: convert page to zpdesc in __release_z3fold_page alexs
2024-06-21 5:46 ` [PATCH 08/15] mm/z3fold: use zpdesc free_pages_work alexs
2024-06-21 5:46 ` [PATCH 09/15] mm/z3fold: use zpdesc in z3fold_compact_page and do_compact_page alexs
2024-06-21 5:46 ` [PATCH 10/15] mm/z3fold: use zpdesc in __z3fold_alloc alexs
2024-06-21 5:46 ` [PATCH 11/15] mm/z3fold: use zpdesc in z3fold_alloc alexs
2024-06-21 5:46 ` [PATCH 12/15] mm/z3fold: use zpdesc in free_z3fold_page and z3fold_free alexs
2024-06-21 5:46 ` [PATCH 13/15] mm/z3fold: use zpdesc in z3fold_map/z3fold_unmap alexs
2024-06-21 5:46 ` [PATCH 14/15] mm/z3fold: introduce __zpdesc_set_movable alexs
2024-06-21 5:46 ` [PATCH 15/15] mm/z3fold: introduce __zpdesc_clear_movable alexs
2024-06-21 6:43 ` Alex Shi [this message]
2024-06-24 21:46 ` [PATCH 00/15] add zpdesc memory descriptor for zswap.zpool Yosry Ahmed
2024-06-25 8:11 ` Alex Shi
2024-06-25 9:28 ` Hyeonggon Yoo
2024-06-25 13:39 ` Alex Shi
2024-06-25 10:30 ` Yosry Ahmed
2024-06-25 13:44 ` Alex Shi
2024-06-25 17:22 ` Nhat Pham
2024-06-25 21:02 ` Yosry Ahmed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15ee2753-a3f6-4b41-8afa-344ce9154161@gmail.com \
--to=seakeel@gmail.com \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=david@redhat.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=vitaly.wool@konsulko.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox