On Tue, Aug 15, 2023 at 05:17:36PM +0200, Jesper Dangaard Brouer wrote: > For the bulk API to perform efficiently the slub fragmentation need to > be low. Especially for the SLUB allocator, the efficiency of bulk free > API depend on objects belonging to the same slab (page). Hey Jesper, You probably haven't seen this patch series from Vlastimil: https://lore.kernel.org/linux-mm/20230810163627.6206-9-vbabka@xxxxxxx/ I wonder if you'd like to give it a try? It should provide some immunity to this problem, and might even be faster than the current approach. If it isn't, it'd be good to understand why, and if it could be improved. No objection to this patch going in for now, of course.