Re: [PATCH] sched/isolation: Make NO_HZ_FULL select CPU_ISOLATION
From: Paul E. McKenney
Date: Sat Dec 02 2017 - 14:24:54 EST
On Sat, Dec 02, 2017 at 02:59:12PM +0100, Frederic Weisbecker wrote:
> 2017-11-30 21:20 UTC+01:00, Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>:
> > Commit 5c4991e24c69 ("sched/isolation: Split out new
> > CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL") can result in RCU
> > CPU stall warnings when running rcutorture with CONFIG_NO_HZ_FULL_ALL=y
> > and CONFIG_CPU_ISOLATION=n. These warnings are caused by RCU's
> > grace-period kthreads sleeping for a few jiffies, but never being
> > awakened:
> >
> > [ 116.353432] rcu_preempt kthread starved for 9974 jiffies! g4294967208
> > +c4294967207 f0x0 RCU_GP_WAIT_FQS(3) ->state=0x402 ->cpu=0
> > [ 116.355517] rcu_preempt I 7464 8 2 0x80000000
> > [ 116.356543] Call Trace:
> > [ 116.357008] __schedule+0x493/0x620
> > [ 116.357682] schedule+0x24/0x40
> > [ 116.358291] schedule_timeout+0x330/0x3b0
> > [ 116.359024] ? preempt_count_sub+0xea/0x140
> > [ 116.359806] ? collect_expired_timers+0xb0/0xb0
> > [ 116.360660] rcu_gp_kthread+0x6bf/0xef0
> >
> > This commit therefore makes NO_HZ_FULL select CPU_ISOLATION, which
> > prevents this behavior and seems like it was the original intention in
> > any case.
>
> Although CONFIG_NO_HZ should indeed select CONFIG_CPU_ISOLATION, I'm
> surprised about this stall. I'm even more surprised that setting
> CONFIG_CPU_ISOLATION=y is enough to fix the issue because
> CONFIG_NO_HZ_FULL_ALL shortcuts CONFIG_CPU_ISOLATION entirely (which
> is not good, but work in progress...).
Yes, and after applying this patch, I get failures a few commits
later, which appears to be due to other changes that break
CONFIG_NO_HZ_FULL_ALL=y. So I have another patch staged that removes
CONFIG_NO_HZ_FULL_ALL, on the grounds that no one else has complained,
so rcutorture is likely to be the only user, and I don't see the point
of having a Kconfig option for only one user.
> Did you have any nohz_full= or isolcpus= boot options?
Replacing CONFIG_NO_HZ_FULL_ALL=y with nohz_full=1-7 works, that
is CONFIG_NO_HZ_FULL=y, CONFIG_NO_HZ_FULL_ALL=n, and nohz_full=1-7
on an eight-CPU test.
But it is relatively easy to test. Running the rcutorture TREE04
scenario on a four-socket x86 gets me RCU CPU stall warnings within
a few minutes more than half the time. ;-)
Thanx, Paul