On Tue, 3 Mar 2020 at 23:17, Yang Shi <shy828301@xxxxxxxxx> wrote: > > On Tue, Mar 3, 2020 at 2:53 AM Tetsuo Handa > <penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote: > > > > Hello, Naresh. > > > > > [ 98.003346] WARNING: CPU: 2 PID: 340 at > > > include/linux/sched/mm.h:323 alloc_page_buffers+0x210/0x288 <Trim> > > > Could you please try the below debug patch? This is not the proper > fix, but it may help us narrow down the problem. > > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > index c49257a..1cc1cdc 100644 > --- a/include/linux/sched/mm.h > +++ b/include/linux/sched/mm.h > @@ -320,6 +320,10 @@ static inline void > memalloc_nocma_restore(unsigned int flags) > */ > static inline void memalloc_use_memcg(struct mem_cgroup *memcg) > { > + if ((current->flags & PF_KTHREAD) && > + current->active_memcg) > + return; > + > WARN_ON_ONCE(current->active_memcg); > current->active_memcg = memcg; > } After applying this patch the reported "warning" did not happen. Here is the full test log. https://lkft.validation.linaro.org/scheduler/job/1265325#L1287 - Naresh