Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mm, slab: optimize returning objects after a partial refill
@ 2026-05-22 14:23 Vlastimil Babka (SUSE)
  2026-05-22 14:23 ` [PATCH v3 1/2] mm, slab: add an optimistic __slab_try_return_freelist() Vlastimil Babka (SUSE)
  2026-05-22 14:23 ` [PATCH v3 2/2] mm, slab: simplify returning slab in __refill_objects_node() Vlastimil Babka (SUSE)
  0 siblings, 2 replies; 7+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-05-22 14:23 UTC (permalink / raw)
  To: Harry Yoo
  Cc: Hao Li, Christoph Lameter, David Rientjes, Roman Gushchin,
	Andrew Morton, linux-mm, linux-kernel, hu.shengming,
	Vinicius Costa Gomes, Vlastimil Babka (SUSE)

Optimizes the current refill leftover handling in a way that should have
no downsides, so we have a better baseline for any further changes (e.g.
spilling or caching the leftover) that involve some tradeoffs.

It's based on slab/for-7.2/perf without the previous version of the
first patch. Sending a new version due to accumulated fixups to the
first patch that resolve a perf regression, and a new cleanup patch on
top.

Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
---
Changes in v3:
- Fixup patch 1 to resolve lkp regression https://lore.kernel.org/all/202605112204.9382cecf-lkp@intel.com/
  - Return slabs to tail of the partial list - this resolved the
    regression.
  - Remove an unlikely() - this had no effect but it's factually
    correct.
- Add patch 2 wich further changes created by trying to resolve the
  regression. Those had no effect but still makes sense as a code
  simplification.
- Link to v2: https://patch.msgid.link/20260427-b4-refill-optimistic-return-v2-1-1672467a792d@kernel.org

Changes in v2:
- rebase to slab/for-7.2/perf, drop RFC
- simplify to reuse the existing reattaching to partial list (Hao Li)
- Add R-b from Hao Li, thanks!
- drop the stat items - they serverd to verify the optimistic path was
  succeeding, but are too detailed for mainline
- Link to v1: https://patch.msgid.link/20260421-b4-refill-optimistic-return-v1-1-24f0bfc1acff@kernel.org

---
Vlastimil Babka (SUSE) (2):
      mm, slab: add an optimistic __slab_try_return_freelist()
      mm, slab: simplify returning slab in __refill_objects_node()

 mm/slub.c | 69 ++++++++++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 48 insertions(+), 21 deletions(-)
---
base-commit: dc795d4c0282a4fbfbcd76a70c09ca0888678443
change-id: 20260421-b4-refill-optimistic-return-f44d3b74cc49

Best regards,
--  
Vlastimil Babka (SUSE) <vbabka@kernel.org>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-25 11:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 14:23 [PATCH v3 0/2] mm, slab: optimize returning objects after a partial refill Vlastimil Babka (SUSE)
2026-05-22 14:23 ` [PATCH v3 1/2] mm, slab: add an optimistic __slab_try_return_freelist() Vlastimil Babka (SUSE)
2026-05-22 17:40   ` Vlastimil Babka (SUSE)
2026-05-22 14:23 ` [PATCH v3 2/2] mm, slab: simplify returning slab in __refill_objects_node() Vlastimil Babka (SUSE)
2026-05-25  6:47   ` Hao Li
2026-05-25  7:15     ` Vlastimil Babka (SUSE)
2026-05-25 11:51       ` Hao Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox