All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-zsmalloc-document-free_zspage-helper-variants.patch removed from -mm tree
@ 2026-07-29  4:14 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-07-29  4:14 UTC (permalink / raw)
  To: mm-commits, xueyuan.chen21, senozhatsky, nphamcs, minchan,
	joshua.hahnjy, baohua, haowenchao, akpm


The quilt patch titled
     Subject: mm/zsmalloc: document free_zspage helper variants
has been removed from the -mm tree.  Its filename was
     mm-zsmalloc-document-free_zspage-helper-variants.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Wenchao Hao <haowenchao@xiaomi.com>
Subject: mm/zsmalloc: document free_zspage helper variants
Date: Fri, 26 Jun 2026 09:50:03 +0800

After splitting __free_zspage() into a lockless core and a wrapper that
does the class-stat bookkeeping, three similarly-named helpers coexist:
free_zspage / __free_zspage / __free_zspage_lockless.

Add a comment block above them describing what each does and where it is
used, so the names are not easy to confuse.

No functional change.

Link: https://lore.kernel.org/20260626015003.2965881-5-haowenchao22@gmail.com
Signed-off-by: Wenchao Hao <haowenchao@xiaomi.com>
Suggested-by: Nhat Pham <nphamcs@gmail.com>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Reviewed-by: Barry Song <baohua@kernel.org>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Xueyuan Chen <xueyuan.chen21@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/zsmalloc.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

--- a/mm/zsmalloc.c~mm-zsmalloc-document-free_zspage-helper-variants
+++ a/mm/zsmalloc.c
@@ -877,6 +877,22 @@ unlock:
 	return 0;
 }
 
+/*
+ * Three free helpers, kept apart here:
+ *
+ * __free_zspage_lockless(): bare core; walks zpdescs and returns pages
+ *   to the buddy allocator.  Caller owns all zpdesc locks and has
+ *   removed the zspage from its class list.  Used by zs_free() outside
+ *   class->lock so the buddy-side work does not stall the class.
+ *
+ * __free_zspage(): __free_zspage_lockless() + per-class accounting,
+ *   under class->lock.  Used by async_free_zspage(), the worker for
+ *   zspages whose trylock_zspage() failed.
+ *
+ * free_zspage(): full wrapper - trylock zpdescs, remove from class
+ *   list, call __free_zspage(); kicks deferred free on contention.
+ *   Used by compaction.
+ */
 static inline void __free_zspage_lockless(struct zspage *zspage)
 {
 	struct zpdesc *zpdesc, *next;
_

Patches currently in -mm which might be from haowenchao@xiaomi.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-29  4:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29  4:14 [merged mm-stable] mm-zsmalloc-document-free_zspage-helper-variants.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.