All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,wuqiang.matt@bytedance.com,mhiramat@kernel.org,akpm@linux-foundation.org,zhouwenhao7600@gmail.com,akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] objpool-fix-the-overestimation-of-object-pooling-metadata-size.patch removed from -mm tree
Date: Thu, 12 Feb 2026 15:46:29 -0800	[thread overview]
Message-ID: <20260212234630.60F9EC4CEF7@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: objpool: fix the overestimation of object pooling metadata size
has been removed from the -mm tree.  Its filename was
     objpool-fix-the-overestimation-of-object-pooling-metadata-size.patch

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

------------------------------------------------------
From: zhouwenhao <zhouwenhao7600@gmail.com>
Subject: objpool: fix the overestimation of object pooling metadata size
Date: Mon, 2 Feb 2026 21:28:46 +0800

objpool uses struct objpool_head to store metadata information, and its
cpu_slots member points to an array of pointers that store the addresses
of the percpu ring arrays.  However, the memory size allocated during the
initialization of cpu_slots is nr_cpu_ids * sizeof(struct objpool_slot). 
On a 64-bit machine, the size of struct objpool_slot is 16 bytes, which is
twice the size of the actual pointer required, and the extra memory is
never be used, resulting in a waste of memory.  Therefore, the memory size
required for cpu_slots needs to be corrected.

Link: https://lkml.kernel.org/r/20260202132846.68257-1-zhouwenhao7600@gmail.com
Fixes: b4edb8d2d464 ("lib: objpool added: ring-array based lockless MPMC")
Signed-off-by: zhouwenhao <zhouwenhao7600@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Matt Wu <wuqiang.matt@bytedance.com>
Cc: wuqiang.matt <wuqiang.matt@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/objpool.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/objpool.c~objpool-fix-the-overestimation-of-object-pooling-metadata-size
+++ a/lib/objpool.c
@@ -142,7 +142,7 @@ int objpool_init(struct objpool_head *po
 	pool->gfp = gfp & ~__GFP_ZERO;
 	pool->context = context;
 	pool->release = release;
-	slot_size = nr_cpu_ids * sizeof(struct objpool_slot);
+	slot_size = nr_cpu_ids * sizeof(struct objpool_slot *);
 	pool->cpu_slots = kzalloc(slot_size, pool->gfp);
 	if (!pool->cpu_slots)
 		return -ENOMEM;
_

Patches currently in -mm which might be from zhouwenhao7600@gmail.com are



                 reply	other threads:[~2026-02-12 23:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260212234630.60F9EC4CEF7@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=mhiramat@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=wuqiang.matt@bytedance.com \
    --cc=zhouwenhao7600@gmail.com \
    /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 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.