From: Michal Hocko <mhocko@kernel.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
Boris Zhmurov <bb@kernelpanic.ru>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Vlastimil Babka <vbabka@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
lkp@01.org, kernel test robot <xiaolong.ye@intel.com>
Subject: Re: [lkp] [mm] e7c1db75fe: BUG:sleeping_function_called_from_invalid_context_at_mm/page_alloc.c
Date: Wed, 30 Nov 2016 08:16:02 +0100 [thread overview]
Message-ID: <20161130071602.GA18432@dhcp22.suse.cz> (raw)
In-Reply-To: <20161129191448.GD3924@linux.vnet.ibm.com>
On Tue 29-11-16 11:14:48, Paul E. McKenney wrote:
> On Tue, Nov 29, 2016 at 05:21:19PM +0000, Sudeep Holla wrote:
> > On Sun, Nov 27, 2016 at 6:16 PM, kernel test robot
> > <xiaolong.ye@intel.com> wrote:
> > >
> > > FYI, we noticed the following commit:
> > >
> > > commit e7c1db75fed821a961ce1ca2b602b08e75de0cd8 ("mm: Prevent __alloc_pages_nodemask() RCU CPU stall warnings")
> > > https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
> > >
> > > in testcase: boot
> > >
> > > on test machine: qemu-system-x86_64 -enable-kvm -cpu Nehalem -smp 2 -m 1G
> > >
> > > caused below changes:
> > >
> > [...]
> >
> > > [ 8.953192] BUG: sleeping function called from invalid context at mm/page_alloc.c:3746
> > > [ 8.956353] in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/0
> >
> > I am observing similar BUG/backtrace even on ARM64 platform.
>
> Does the (untested) patch below help?
>
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> commit ccc0666e2049e5818c236e647cf20c552a7b053b
> Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Date: Tue Nov 29 11:06:05 2016 -0800
>
> rcu: Allow boot-time use of cond_resched_rcu_qs()
>
> The cond_resched_rcu_qs() macro is used to force RCU quiescent states into
> long-running in-kernel loops. However, some of these loops can execute
> during early boot when interrupts are disabled, and during which time
> it is therefore illegal to enter the scheduler. This commit therefore
> makes cond_resched_rcu_qs() be a no-op during early boot.
>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This is not the problem with your "mm: Prevent __alloc_pages_nodemask()
RCU CPU stall warnings", though. The main problem imho is that the
allocator might be called from the atomic contexts (aka
gfp_mask & ~__GFP_DIRECT_RECLAIM). Besides that I do not think that any
variant of cond_resched inside the allocator hot path
__alloc_pages_nodemask is just wrong. If anything such a scheduling/RCU
point should be added to the slow path. But as I've said earlier we
already have these points in that path so new ones shouldn't be really
necessary.
Could you drop this patch Paul, please?
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2016-11-30 7:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-27 18:16 kernel test robot
2016-11-29 17:21 ` Sudeep Holla
2016-11-29 19:14 ` Paul E. McKenney
2016-11-29 18:26 ` Ye Xiaolong
2016-11-29 21:39 ` Ye Xiaolong
2016-11-30 6:27 ` [LKP] " Fengguang Wu
2016-11-30 7:16 ` Michal Hocko [this message]
2016-11-30 7:40 ` Paul E. McKenney
2016-11-30 12:28 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161130071602.GA18432@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bb@kernelpanic.ru \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=sudeep.holla@arm.com \
--cc=vbabka@suse.cz \
--cc=xiaolong.ye@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome