From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: linux-next: Tree for May 26 (RCU stalls) Date: Thu, 26 May 2011 13:58:04 -0700 Message-ID: <20110526205804.GJ2386@linux.vnet.ibm.com> References: <20110526173128.GE2386@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from e7.ny.us.ibm.com ([32.97.182.137]:46094 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752321Ab1EZU6H (ORCPT ); Thu, 26 May 2011 16:58:07 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-next-owner@vger.kernel.org List-ID: To: sedat.dilek@gmail.com Cc: Stephen Rothwell , linux-next@vger.kernel.org, LKML On Thu, May 26, 2011 at 08:31:28PM +0200, Sedat Dilek wrote: > On Thu, May 26, 2011 at 7:31 PM, Paul E. McKenney > wrote: > > On Thu, May 26, 2011 at 05:48:32PM +0200, Sedat Dilek wrote: > >> On Thu, May 26, 2011 at 8:39 AM, Stephen Rothwell wrote: > >> > Hi all, > >> > > >> > [The kernel.org mirroring is being slow today] > >> > > >> > Changes since 20110525: > >> > > >> > Linus' tree gained a build failure for which I applied a patch. > >> > > >> > The m68knommu tree lost its conflicts. > >> > > >> > The hwmon-staging lost its conflict. > >> > > >> > The wireless lost its conflict. > >> > > >> > The mmc lost its conflict. > >> > > >> > The dwmw2-iommu tree lost its conflict. > >> > > >> > The kvm tree still had its build failure so I used the version f= rom > >> > next-20110524. > >> > > >> > The namespace lost its conflicts. > >> > > >> > ----------------------------------------------------------------= ------------ > >> > > >> > >> Hi, > >> > >> I see these call-traces on x86 UP machine: > >> > >> [ =A0240.268061] INFO: task rcun0:8 blocked for more than 120 seco= nds. > >> [ =A0240.268069] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs= " > >> disables this message. > >> [ =A0240.268072] rcun0 =A0 =A0 =A0 =A0 =A0 D 00000000 =A0 =A0 0 =A0= =A0 8 =A0 =A0 =A02 0x00000000 > >> [ =A0240.268079] =A0f6473fb8 00000046 013131b6 00000000 c1461ac0 0= 0000000 > >> 00000000 c1461ac0 > >> [ =A0240.268089] =A000000000 00000000 f645dc70 f645bf60 00000003 f= 6473f78 > >> c102a570 f6473f9c > >> [ =A0240.268097] =A0c1021476 00000000 f645bf6c 00000001 00000000 0= 0000286 > >> f6473f9c c129b35a > >> [ =A0240.268106] Call Trace: > >> [ =A0240.268121] =A0[] ? default_wake_function+0xb/0xd > >> [ =A0240.268127] =A0[] ? __wake_up_common+0x33/0x5b > >> [ =A0240.268134] =A0[] ? _raw_spin_unlock_irqrestore+0xe= /0x10 > >> [ =A0240.268140] =A0[] ? complete+0x34/0x3e > >> [ =A0240.268147] =A0[] ? cpumask_weight+0xc/0xc > >> [ =A0240.268157] =A0[] kthread+0x53/0x67 > >> [ =A0240.268162] =A0[] ? kthread_worker_fn+0x111/0x111 > >> [ =A0240.268169] =A0[] kernel_thread_helper+0x6/0xd > >> > >> dmesg and kernel-config are attached. > > > > Hello, Sedat, > > > > Does the following patch clear things up? > > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Thanx, Paul > > > > -------------------------------------------------------------------= ----- > > > > rcu: Start RCU kthreads in TASK_INTERRUPTIBLE state > > > > Upon creation, kthreads are in TASK_UNINTERRUPTIBLE state, which ca= n > > result in softlockup warnings. =A0Because some of RCU's kthreads ca= n > > legitimately be idle indefinitely, start them in TASK_INTERRUPTIBLE > > state in order to avoid those warnings. > > > > Suggested-by: Peter Zijlstra > > Signed-off-by: Paul E. McKenney > > Signed-off-by: Paul E. McKenney > > Tested-by: Yinghai Lu > > > > diff --git a/kernel/rcutree.c b/kernel/rcutree.c > > index a1a8bb6..40aab8d 100644 > > --- a/kernel/rcutree.c > > +++ b/kernel/rcutree.c > > @@ -1647,6 +1647,7 @@ static int __cpuinit rcu_spawn_one_cpu_kthrea= d(int cpu) > > =A0 =A0 =A0 =A0if (IS_ERR(t)) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return PTR_ERR(t); > > =A0 =A0 =A0 =A0kthread_bind(t, cpu); > > + =A0 =A0 =A0 set_task_state(t, TASK_INTERRUPTIBLE); > > =A0 =A0 =A0 =A0per_cpu(rcu_cpu_kthread_cpu, cpu) =3D cpu; > > =A0 =A0 =A0 =A0WARN_ON_ONCE(per_cpu(rcu_cpu_kthread_task, cpu) !=3D= NULL); > > =A0 =A0 =A0 =A0per_cpu(rcu_cpu_kthread_task, cpu) =3D t; > > @@ -1754,6 +1755,7 @@ static int __cpuinit rcu_spawn_one_node_kthre= ad(struct rcu_state *rsp, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (IS_ERR(t)) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return PTR_ERR(t); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0raw_spin_lock_irqsave(&rnp->lock, fl= ags); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 set_task_state(t, TASK_INTERRUPTIBLE)= ; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rnp->node_kthread_task =3D t; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0raw_spin_unlock_irqrestore(&rnp->loc= k, flags); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sp.sched_priority =3D 99; > > diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h > > index 049f278..a767b7d 100644 > > --- a/kernel/rcutree_plugin.h > > +++ b/kernel/rcutree_plugin.h > > @@ -1295,6 +1295,7 @@ static int __cpuinit rcu_spawn_one_boost_kthr= ead(struct rcu_state *rsp, > > =A0 =A0 =A0 =A0if (IS_ERR(t)) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return PTR_ERR(t); > > =A0 =A0 =A0 =A0raw_spin_lock_irqsave(&rnp->lock, flags); > > + =A0 =A0 =A0 set_task_state(t, TASK_INTERRUPTIBLE); > > =A0 =A0 =A0 =A0rnp->boost_kthread_task =3D t; > > =A0 =A0 =A0 =A0raw_spin_unlock_irqrestore(&rnp->lock, flags); > > =A0 =A0 =A0 =A0sp.sched_priority =3D RCU_KTHREAD_PRIO; > > >=20 > Thanks for the quick reply and patch! >=20 > On 1st look at dmesg the RCU stalls are gone. > I tested against linux-next (next-20110526). >=20 > Feel free to add: >=20 > Tested-by: Sedat Dilek Thank you for testing, Sedat! Thanx, Paul