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>