[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230713042037.980211-20-42.hyeyoo@gmail.com>
Date: Thu, 13 Jul 2023 13:20:34 +0900
From: Hyeonggon Yoo <42.hyeyoo@...il.com>
To: Minchan Kim <minchan@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Matthew Wilcox <willy@...radead.org>,
Mike Rapoport <rppt@...nel.org>,
Hyeonggon Yoo <42.hyeyoo@...il.com>
Subject: [RFC PATCH v2 19/21] mm/zsmalloc: convert SetZsPageMovable() to use zsdesc
Convert SetZsPageMovable() to use zsdesc.
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@...il.com>
---
mm/zsmalloc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 6cb216b8564a..5f07e3d92a99 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -2117,13 +2117,13 @@ static void init_deferred_free(struct zs_pool *pool)
static void SetZsPageMovable(struct zs_pool *pool, struct zspage *zspage)
{
- struct page *page = get_first_page(zspage);
+ struct zsdesc *zsdesc = get_first_zsdesc(zspage);
do {
- WARN_ON(!trylock_page(page));
- __SetPageMovable(page, &zsmalloc_mops);
- unlock_page(page);
- } while ((page = get_next_page(page)) != NULL);
+ WARN_ON(!trylock_zsdesc(zsdesc));
+ zsdesc_set_movable(zsdesc);
+ unlock_zsdesc(zsdesc);
+ } while ((zsdesc = get_next_zsdesc(zsdesc)) != NULL);
}
#else
static inline void zs_flush_migration(struct zs_pool *pool) { }
--
2.41.0
Powered by blists - more mailing lists