Re: [PATCH V2 2/2] slub: add missing kmem cgroup support to kmem_cache_free_bulk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 7 Nov 2015, Vladimir Davydov wrote:

> Hmm, I thought that a bunch of objects allocated using
> kmem_cache_alloc_bulk must be freed using kmem_cache_free_bulk. If it
> does not hold, i.e. if one can allocate an array of objects one by one
> using kmem_cache_alloc and then batch-free them using
> kmem_cache_free_bulk, then my proposal is irrelevant.

Nope they can be allocated and freed in multiple ways.

> > With my limited mem cgroups, it looks like memcg works on the slab-page
> > level?
>
> Yes, a memcg has its private copy of each global kmem cache it attempted
> to use, which implies that all objects on the same slab-page must belong
> to the same memcg.

Every memcg duplicates all slab caches and thus these are separate caches.
Bulk freeing to a mixture of cgroups caches does not work.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]