On Fri, 17 Jul 2020 at 01:38, Roman Gushchin <guro@xxxxxx> wrote: > > On Thu, Jul 16, 2020 at 10:25:01PM +0530, Naresh Kamboju wrote: > > On Tue, 23 Jun 2020 at 23:11, Roman Gushchin <guro@xxxxxx> wrote: > > > > > > Store the obj_cgroup pointer in the corresponding place of > > > page->obj_cgroups for each allocated non-root slab object. Make sure that > > > each allocated object holds a reference to obj_cgroup. > > > > > > Objcg pointer is obtained from the memcg->objcg dereferencing in > > > memcg_kmem_get_cache() and passed from pre_alloc_hook to post_alloc_hook. > > > Then in case of successful allocation(s) it's getting stored in the > > > page->obj_cgroups vector. > > > > > > The objcg obtaining part look a bit bulky now, but it will be simplified > > > by next commits in the series. > > > > > > Signed-off-by: Roman Gushchin <guro@xxxxxx> > > > Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx> > > > Reviewed-by: Shakeel Butt <shakeelb@xxxxxxxxxx> > > > --- > > > include/linux/memcontrol.h | 3 +- > > > mm/memcontrol.c | 14 +++++++-- > > > mm/slab.c | 18 +++++++----- > > > mm/slab.h | 60 ++++++++++++++++++++++++++++++++++---- > > > mm/slub.c | 14 +++++---- > > > 5 files changed, 88 insertions(+), 21 deletions(-) > > > > > > > I am not sure if this is the related patch or not that is causing > > mips architecture build failure on linux -next. > > Hello, Naresh! > > Thank you for the report, interesting... > There is nothing arch-specific in the code, so there must be something > compiler-dependent. My wild guess is that the problem is caused by a memory > allocation from the memcg_slab_post_alloc_hook(), but it's added by a later > patch in the series. So if it really fails at this patch, there must be something > different. I'll try to reproduce it, but I have to install the MIPS toolchain first, > so it might take some time. If it creates some troubles, can you, please, check > if s/__always_inline/inline helps? sed -i -e 's#__always_inline#inline#g' mm/slub.c ->> then builds fine. - Naresh