[PATCH v3 0/2] mm/slub: batch partial slab list operations

Hao Li posted 2 patches 1 week, 3 days ago
mm/slub.c | 51 +++++++++++++++++++++++++++++++++++++--------------
1 file changed, 37 insertions(+), 14 deletions(-)
[PATCH v3 0/2] mm/slub: batch partial slab list operations
Posted by Hao Li 1 week, 3 days ago
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
Re: [PATCH v3 0/2] mm/slub: batch partial slab list operations
Posted by Vlastimil Babka (SUSE) 1 week, 3 days ago
On 5/29/26 05:50, Hao Li wrote:
> 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(-)

Applied to slab/for-next, thanks!

> base-commit: 6b41dc6749232c14f3e069f8115084a7bbeee402