All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] mm-zsmalloc-drop-pool-lock-from-zs_free-on-64-bit-systems-fix-2.patch removed from -mm tree
@ 2026-07-29  3:54 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-07-29  3:54 UTC (permalink / raw)
  To: mm-commits, xueyuan.chen21, senozhatsky, nphamcs, minchan,
	joshua.hahnjy, haowenchao, baohua, akpm


The quilt patch titled
     Subject: mm-zsmalloc-drop-pool-lock-from-zs_free-on-64-bit-systems-fix-2
has been removed from the -mm tree.  Its filename was
     mm-zsmalloc-drop-pool-lock-from-zs_free-on-64-bit-systems-fix-2.patch

This patch was dropped because it was folded into mm-zsmalloc-drop-pool-lock-from-zs_free-on-64-bit-systems.patch

------------------------------------------------------
From: "Barry Song (Xiaomi)" <baohua@kernel.org>
Subject: mm-zsmalloc-drop-pool-lock-from-zs_free-on-64-bit-systems-fix-2
Date: Sat, 25 Jul 2026 11:45:09 +0800

mm: zsmalloc: update the comment about pool lock

Update the comment to reflect that `zs_free()` can be lockless when
`ZS_OBJ_CLASS_BITS` applies.

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

 mm/zsmalloc.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/mm/zsmalloc.c~mm-zsmalloc-drop-pool-lock-from-zs_free-on-64-bit-systems-fix-2
+++ a/mm/zsmalloc.c
@@ -1832,8 +1832,8 @@ static int zs_page_migrate(struct page *
 	pool = zspage->pool;
 
 	/*
-	 * The pool migrate_lock protects the race between zpage migration
-	 * and zs_free.
+	 * The pool migrate_lock protects against races between zpage migration
+	 * and zs_free(), but only when ZS_OBJ_CLASS_BITS does not apply.
 	 */
 	write_lock(&pool->lock);
 	class = zspage_class(pool, zspage);
@@ -2012,8 +2012,9 @@ static unsigned long __zs_compact(struct
 	unsigned long pages_freed = 0;
 
 	/*
-	 * protect the race between zpage migration and zs_free
-	 * as well as zpage allocation/free
+	 * Protect against races between zpage migration and zs_free()
+	 * (only when ZS_OBJ_CLASS_BITS does not apply), as well as
+	 * zpage allocation and free.
 	 */
 	write_lock(&pool->lock);
 	spin_lock(&class->lock);
_

Patches currently in -mm which might be from baohua@kernel.org are

mm-zsmalloc-drop-pool-lock-from-zs_free-on-64-bit-systems.patch
mm-avoid-unnecessary-lru-drain-for-wp_can_reuse_anon_folio.patch
mm-avoid-unnecessary-lru-drain-for-wp_can_reuse_anon_folio-fix.patch
mm-drop-stale-folio_ref_count==1-check-in-do_swap_page-reuse-logic.patch
mm-entirely-remove-lru_add_drain-in-do_swap_page.patch
mm-clarify-the-folio_free_swap-for-do_swap_page.patch
arm64-hugetlb-extend-batching-of-multiple-cont_pte-in-a-single-pte-setup.patch
arm64-vmalloc-allow-arch_vmap_pte_range_map_size-to-batch-multiple-cont_pte.patch
mm-vmalloc-extend-page-table-walk-to-support-larger-page_shift-sizes-and-eliminate-page-table-rewalk.patch
mm-vmalloc-map-contiguous-pages-in-batches-for-vmap-if-possible.patch
mm-vmalloc-align-vm_area-so-vmap-can-batch-mappings.patch


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

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

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29  3:54 [folded-merged] mm-zsmalloc-drop-pool-lock-from-zs_free-on-64-bit-systems-fix-2.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.