> 1 дек. 2016 г., в 4:16, Anatoly Stepanov <astepanov@xxxxxxxxxxxxxx> написал(а): > > As memcg array size can be up to: > sizeof(struct memcg_cache_array) + kmemcg_id * sizeof(void *); > > where kmemcg_id can be up to MEMCG_CACHES_MAX_SIZE. > > When a memcg instance count is large enough it can lead > to high order allocations up to order 7. > > The same story with memcg_lrus allocations. > So let's work this around by utilizing vmalloc fallback path. > > Signed-off-by: Anatoly Stepanov <astepanov@xxxxxxxxxxxxxx> > --- > include/linux/memcontrol.h | 16 ++++++++++++++++ > mm/list_lru.c | 14 +++++++------- > mm/slab_common.c | 21 ++++++++++++++------- > 3 files changed, 37 insertions(+), 14 deletions(-) > > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h > index 61d20c1..a281622 100644 > --- a/include/linux/memcontrol.h > +++ b/include/linux/memcontrol.h > @@ -29,6 +29,9 @@ > #include <linux/mmzone.h> > #include <linux/writeback.h> > #include <linux/page-flags.h> > +#include <linux/vmalloc.h> > +#include <linux/slab.h> > +#include <linux/mm.h> > > struct mem_cgroup; > struct page; > @@ -878,4 +881,17 @@ static inline void memcg_kmem_update_page_stat(struct page *page, > } > #endif /* CONFIG_MEMCG && !CONFIG_SLOB */ > > +static inline void memcg_free(const void *ptr) > +{ > + is_vmalloc_addr(ptr) ? vfree(ptr) : kfree(ptr); > +} please to use a kvfree() instead. -- 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