All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hao Li <hao.li@linux.dev>
To: vbabka@kernel.org, harry@kernel.org, akpm@linux-foundation.org
Cc: cl@gentwo.org, rientjes@google.com, roman.gushchin@linux.dev,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Hao Li <hao.li@linux.dev>
Subject: [PATCH v2 0/2] mm/slub: batch partial slab list operations
Date: Thu, 28 May 2026 17:52:42 +0800	[thread overview]
Message-ID: <20260528095254.43721-1-hao.li@linux.dev> (raw)

The loops in get_partial_node_bulk() and __refill_objects_node() perform
individual list operations for each slab. This patchset optimize this.

Patch 1 reduces the number of list operations by processing slabs in
batches, thereby minimizing the time spent inside the critical section.

Patch 2 is a cleanup patch that wraps duplicated code into a helper
function.

Changes in v2:
- Patch 1 apply the same optimization to __refill_objects_node. (Thanks
  Harry and Vlastimil)
- Patch 2 introduce a helper to wraps duplicated code. (Thanks Harry)

Hao Li (2):
  mm/slub: detach and reattach partial slabs in batch
  mm/slub: introduce helper to decrement partial slab count and clear
    flag

 mm/slub.c | 43 +++++++++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 12 deletions(-)

base-commit: 6b41dc6749232c14f3e069f8115084a7bbeee402
-- 
2.54.0



             reply	other threads:[~2026-05-28  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28  9:52 Hao Li [this message]
2026-05-28  9:52 ` [PATCH v2 1/2] mm/slub: detach and reattach partial slabs in batch Hao Li
2026-05-28  9:52 ` [PATCH v2 2/2] mm/slub: introduce helper to decrement partial slab count and clear flag Hao Li

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=20260528095254.43721-1-hao.li@linux.dev \
    --to=hao.li@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=harry@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@kernel.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 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.