From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Hyeonggon Yoo <hyeonggon.yoo@sk.com>,
Matthew Wilcox <willy@infradead.org>,
kernel_team@skhynix.com, Minchan Kim <minchan@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Vishal Moola <vishal.moola@gmail.com>,
Alex Shi <seakeel@gmail.com>, Alex Shi <alexs@kernel.org>
Subject: [PATCH v9 mm-unstable 19/19] mm/zsmalloc: reset zpdesc fields in reset_zpdesc()
Date: Tue, 14 Jan 2025 00:29:52 +0900 [thread overview]
Message-ID: <Z4Uw136VdG7vlKCL@localhost.localdomain> (raw)
In-Reply-To: <20250110173235.5b7e6ca5beb189a1270627fa@linux-foundation.org>
To prepare for the future removal of struct page fields (e.g. the removal
of page->index [1]), update reset_zpdesc() to reset the descriptor
via struct zpdesc instead of struct page.
As struct zpdesc overlays struct page for now,
no functional change is intended.
[1] https://lore.kernel.org/linux-mm/Z09hOy-UY9KC8WMb@casper.infradead.org
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
---
mm/zsmalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index dae32e051779..817626a351f8 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -826,8 +826,8 @@ static void reset_zpdesc(struct zpdesc *zpdesc)
__ClearPageMovable(page);
ClearPagePrivate(page);
- set_page_private(page, 0);
- page->index = 0;
+ zpdesc->zspage = NULL;
+ zpdesc->next = NULL;
__ClearPageZsmalloc(page);
}
--
2.43.5
next prev parent reply other threads:[~2025-01-13 15:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 15:04 [PATCH v9 mm-unstable 00/18] Add zpdesc memory descriptor for zswap.zpool Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 01/18] mm/zsmalloc: add " Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 02/18] mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage() Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 03/18] mm/zsmalloc: convert __zs_map_object/__zs_unmap_object to use zpdesc Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 04/18] mm/zsmalloc: add and use pfn/zpdesc seeking funcs Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 05/18] mm/zsmalloc: convert obj_malloc() to use zpdesc Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 06/18] mm/zsmalloc: convert create_page_chain() and its users " Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 07/18] mm/zsmalloc: convert obj_allocated() and related helpers " Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 08/18] mm/zsmalloc: convert init_zspage() " Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 09/18] mm/zsmalloc: convert obj_to_page() and zs_free() " Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 10/18] mm/zsmalloc: add two helpers for zs_page_migrate() and make it " Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 11/18] mm/zsmalloc: convert reset_page to reset_zpdesc Hyeonggon Yoo
2025-01-10 4:43 ` Matthew Wilcox
2025-01-10 6:08 ` Hyeonggon Yoo
2025-01-11 1:32 ` Andrew Morton
2025-01-13 15:29 ` Hyeonggon Yoo [this message]
2024-12-16 15:04 ` [PATCH v9 mm-unstable 12/18] mm/zsmalloc: convert __free_zspage() to use zpdesc Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 13/18] mm/zsmalloc: convert location_to_obj() to take zpdesc Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 14/18] mm/zsmalloc: convert migrate_zspage() to use zpdesc Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 15/18] mm/zsmalloc: convert get_zspage() to take zpdesc Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 16/18] mm/zsmalloc: convert SetZsPageMovable and remove unused funcs Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 17/18] mm/zsmalloc: convert get/set_first_obj_offset() to take zpdesc Hyeonggon Yoo
2024-12-16 15:04 ` [PATCH v9 mm-unstable 18/18] mm/zsmalloc: introduce __zpdesc_clear/set_zsmalloc() Hyeonggon Yoo
2024-12-26 1:54 ` [PATCH v9 mm-unstable 00/18] Add zpdesc memory descriptor for zswap.zpool Sergey Senozhatsky
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=Z4Uw136VdG7vlKCL@localhost.localdomain \
--to=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=hyeonggon.yoo@sk.com \
--cc=kernel_team@skhynix.com \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=seakeel@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=vishal.moola@gmail.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