Linux-mm Archive on 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 v3 0/2] mm/slub: batch partial slab list operations
Date: Fri, 29 May 2026 11:50:50 +0800	[thread overview]
Message-ID: <20260529035120.81304-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 is a cleanup patch that wraps duplicated code into helper
functions.

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

Changes in v3:
- Reorder the two patches for better logical flow. (Thanks Vlastimil)
- Introduce set_node_partial_state for symmetry. (Thanks Vlastimil)

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

Hao Li (2):
  mm/slub: introduce helpers for node partial slab state
  mm/slub: detach and reattach partial slabs in batch

 mm/slub.c | 51 +++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 37 insertions(+), 14 deletions(-)

base-commit: 6b41dc6749232c14f3e069f8115084a7bbeee402
-- 
2.54.0



             reply	other threads:[~2026-05-29  3:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  3:50 Hao Li [this message]
2026-05-29  3:50 ` [PATCH v3 1/2] mm/slub: introduce helpers for node partial slab state Hao Li
2026-05-29  3:50 ` [PATCH v3 2/2] mm/slub: detach and reattach partial slabs in batch Hao Li
2026-05-29  8:01 ` [PATCH v3 0/2] mm/slub: batch partial slab list operations Vlastimil Babka (SUSE)

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=20260529035120.81304-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox