Re: [PATCH slab/for-next] mm/slab: simplify freeing remote objects in free_to_pcs_bulk()

From: Hao Li

Date: Mon Jul 13 2026 - 02:34:00 EST


On Fri, Jul 10, 2026 at 02:04:58PM +0200, Vlastimil Babka (SUSE) wrote:
> We have been moving remote objects to an on-stack array and flushing it
> when full. Instead, we can swap them towards the beginning of the
> supplied array and bulk-free it just once.
>
> Also add a comment to explain the rationale of freeing remote objects
> last, because now it would appear to be simpler to free them first.
>
> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
> ---
> One more cleanup I realized it's possible when processing feedback to
> the previous one [1]
>
> [1] https://lore.kernel.org/all/20260707-slab-simplify-bulk-pcs-v1-1-4850dbe0d904@xxxxxxxxxx/
> ---
> mm/slub.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)

Nice idea!
Reviewed-by: Hao Li <hao.li@xxxxxxxxx>

--
Thanks,
Hao