public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
@ 2012-08-23 14:58 Frederic Weisbecker
  0 siblings, 0 replies; 15+ messages in thread
From: Frederic Weisbecker @ 2012-08-23 14:58 UTC (permalink / raw)
  To: LKML
  Cc: Frederic Weisbecker, Paul E. McKenney, Chris Zankel, 3.2.x..,
	Chen Liqin, Lennox Wu, James E.J. Bottomley, Helge Deller, Parisc,
	David Howells, Koichi Yasutake, Geert Uytterhoeven, m68k,
	Hirokazu Takata, Yoshinori Sato, Mikael Starvik, Jesper Nilsson,
	Cris, Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha, Mic

Hi,

Changes since v1:

- Fixed preempt handling in alpha idle loop
- added ack from Geert
- fixed stable email address, sorry :-/

This time I built tested everywhere but: h8300 (compiler internal error),
and mn10300, parisc, score (cross compilers not available in
ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)

For testing, you can pull from:

git://github.com/fweisbec/linux-dynticks.git
	rcu/idle-fix-v2 

Thanks.

Frederic Weisbecker (11):
  alpha: Fix preemption handling in idle loop
  alpha: Add missing RCU idle APIs on idle loop
  cris: Add missing RCU idle APIs on idle loop
  frv: Add missing RCU idle APIs on idle loop
  h8300: Add missing RCU idle APIs on idle loop
  m32r: Add missing RCU idle APIs on idle loop
  m68k: Add missing RCU idle APIs on idle loop
  mn10300: Add missing RCU idle APIs on idle loop
  parisc: Add missing RCU idle APIs on idle loop
  score: Add missing RCU idle APIs on idle loop
  xtensa: Add missing RCU idle APIs on idle loop

 arch/alpha/kernel/process.c   |    6 +++++-
 arch/alpha/kernel/smp.c       |    1 +
 arch/cris/kernel/process.c    |    3 +++
 arch/frv/kernel/process.c     |    3 +++
 arch/h8300/kernel/process.c   |    3 +++
 arch/m32r/kernel/process.c    |    3 +++
 arch/m68k/kernel/process.c    |    3 +++
 arch/mn10300/kernel/process.c |    3 +++
 arch/parisc/kernel/process.c  |    3 +++
 arch/score/kernel/process.c   |    4 +++-
 arch/xtensa/kernel/process.c  |    3 +++
 11 files changed, 33 insertions(+), 2 deletions(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 07/11] m68k: Add missing RCU idle APIs on idle loop
       [not found] <1345733915-20040-1-git-send-email-fweisbec@gmail.com>
@ 2012-08-23 14:58 ` Frederic Weisbecker
  2012-08-24 21:26 ` [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2 Paul E. McKenney
  1 sibling, 0 replies; 15+ messages in thread
From: Frederic Weisbecker @ 2012-08-23 14:58 UTC (permalink / raw)
  To: LKML; +Cc: Frederic Weisbecker, m68k, 3.2.x.., Paul E. McKenney

In the old times, the whole idle task was considered
as an RCU quiescent state. But as RCU became more and
more successful overtime, some RCU read side critical
section have been added even in the code of some
architectures idle tasks, for tracing for example.

So nowadays, rcu_idle_enter() and rcu_idle_exit() must
be called by the architecture to tell RCU about the part
in the idle loop that doesn't make use of rcu read side
critical sections, typically the part that puts the CPU
in low power mode.

This is necessary for RCU to find the quiescent states in
idle in order to complete grace periods.

Add this missing pair of calls in the m68k's idle loop.

Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: m68k <linux-m68k@lists.linux-m68k.org>
Cc: 3.2.x.. <stable@vger.kernel.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 arch/m68k/kernel/process.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index c488e3c..ac2892e 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -25,6 +25,7 @@
 #include <linux/reboot.h>
 #include <linux/init_task.h>
 #include <linux/mqueue.h>
+#include <linux/rcupdate.h>
 
 #include <asm/uaccess.h>
 #include <asm/traps.h>
@@ -75,8 +76,10 @@ void cpu_idle(void)
 {
 	/* endless idle loop with no priority at all */
 	while (1) {
+		rcu_idle_enter();
 		while (!need_resched())
 			idle();
+		rcu_idle_exit();
 		schedule_preempt_disabled();
 	}
 }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found] <1345733915-20040-1-git-send-email-fweisbec@gmail.com>
  2012-08-23 14:58 ` [PATCH 07/11] m68k: Add missing RCU idle APIs on idle loop Frederic Weisbecker
@ 2012-08-24 21:26 ` Paul E. McKenney
  2012-08-25  1:19   ` Ben Hutchings
       [not found]   ` <1345857554.4840.43.camel@deadeye.wl.decadent.org.uk>
  1 sibling, 2 replies; 15+ messages in thread
From: Paul E. McKenney @ 2012-08-24 21:26 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: LKML, Chris Zankel, 3.2.x.., Chen Liqin, Lennox Wu,
	James E.J. Bottomley, Helge Deller, Parisc, David Howells,
	Koichi Yasutake, Geert Uytterhoeven, m68k, Hirokazu Takata,
	Yoshinori Sato, Mikael Starvik, Jesper Nilsson, Cris,
	Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha,
	Michael Cree

On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
> Hi,
> 
> Changes since v1:
> 
> - Fixed preempt handling in alpha idle loop
> - added ack from Geert
> - fixed stable email address, sorry :-/
> 
> This time I built tested everywhere but: h8300 (compiler internal error),
> and mn10300, parisc, score (cross compilers not available in
> ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
> 
> For testing, you can pull from:
> 
> git://github.com/fweisbec/linux-dynticks.git
> 	rcu/idle-fix-v2 
> 
> Thanks.

I have queued these on -rcu branch rcu/idle:

	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git

This problem has been in place since 3.3, so it is hard to argue that
it is a regression for this merge window.  I have therefore queued it
for 3.7.

								Thanx, Paul

> Frederic Weisbecker (11):
>   alpha: Fix preemption handling in idle loop
>   alpha: Add missing RCU idle APIs on idle loop
>   cris: Add missing RCU idle APIs on idle loop
>   frv: Add missing RCU idle APIs on idle loop
>   h8300: Add missing RCU idle APIs on idle loop
>   m32r: Add missing RCU idle APIs on idle loop
>   m68k: Add missing RCU idle APIs on idle loop
>   mn10300: Add missing RCU idle APIs on idle loop
>   parisc: Add missing RCU idle APIs on idle loop
>   score: Add missing RCU idle APIs on idle loop
>   xtensa: Add missing RCU idle APIs on idle loop
> 
>  arch/alpha/kernel/process.c   |    6 +++++-
>  arch/alpha/kernel/smp.c       |    1 +
>  arch/cris/kernel/process.c    |    3 +++
>  arch/frv/kernel/process.c     |    3 +++
>  arch/h8300/kernel/process.c   |    3 +++
>  arch/m32r/kernel/process.c    |    3 +++
>  arch/m68k/kernel/process.c    |    3 +++
>  arch/mn10300/kernel/process.c |    3 +++
>  arch/parisc/kernel/process.c  |    3 +++
>  arch/score/kernel/process.c   |    4 +++-
>  arch/xtensa/kernel/process.c  |    3 +++
>  11 files changed, 33 insertions(+), 2 deletions(-)
> 
> -- 
> 1.7.5.4
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
  2012-08-24 21:26 ` [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2 Paul E. McKenney
@ 2012-08-25  1:19   ` Ben Hutchings
       [not found]   ` <1345857554.4840.43.camel@deadeye.wl.decadent.org.uk>
  1 sibling, 0 replies; 15+ messages in thread
From: Ben Hutchings @ 2012-08-25  1:19 UTC (permalink / raw)
  To: paulmck
  Cc: Frederic Weisbecker, LKML, Chris Zankel, 3.2.x.., Chen Liqin,
	Lennox Wu, James E.J. Bottomley, Helge Deller, Parisc,
	David Howells, Koichi Yasutake, Geert Uytterhoeven, m68k,
	Hirokazu Takata, Yoshinori Sato, Mikael Starvik, Jesper Nilsson,
	Cris, Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha

[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]

On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
> On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
> > Hi,
> > 
> > Changes since v1:
> > 
> > - Fixed preempt handling in alpha idle loop
> > - added ack from Geert
> > - fixed stable email address, sorry :-/
> > 
> > This time I built tested everywhere but: h8300 (compiler internal error),
> > and mn10300, parisc, score (cross compilers not available in
> > ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
> > 
> > For testing, you can pull from:
> > 
> > git://github.com/fweisbec/linux-dynticks.git
> > 	rcu/idle-fix-v2 
> > 
> > Thanks.
> 
> I have queued these on -rcu branch rcu/idle:
> 
> 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> 
> This problem has been in place since 3.3, so it is hard to argue that
> it is a regression for this merge window.  I have therefore queued it
> for 3.7.

I don't follow that; I would expect any serious bug fix (serious enough
for a stable update) to be acceptable for 3.6 at this point.

If the regression occurred in 3.3, then the cc lines should be something
like:

    Cc: <stable@vger.kernel.org> # 3.3+

and not the current:

    Cc: 3.2.x.. <stable@vger.kernel.org>

(Note, version annotations should be on the right of the address, not in
the 'real name' position on the left.)

Ben.

-- 
Ben Hutchings
Experience is what causes a person to make new mistakes instead of old ones.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]   ` <1345857554.4840.43.camel@deadeye.wl.decadent.org.uk>
@ 2012-08-25  2:10     ` Michael Cree
  2012-08-25  3:50     ` Paul E. McKenney
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Michael Cree @ 2012-08-25  2:10 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: paulmck, Frederic Weisbecker, LKML, Chris Zankel, 3.2.x..,
	Chen Liqin, Lennox Wu, James E.J. Bottomley, Helge Deller, Parisc,
	David Howells, Koichi Yasutake, Geert Uytterhoeven, m68k,
	Hirokazu Takata, Yoshinori Sato, Mikael Starvik, Jesper Nilsson,
	Cris, Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha

On 25/08/12 13:19, Ben Hutchings wrote:
> On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
>> On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
>>> Hi,
>>>
>>> Changes since v1:
>>>
>>> - Fixed preempt handling in alpha idle loop
>>> - added ack from Geert
>>> - fixed stable email address, sorry :-/
>>>
>>> This time I built tested everywhere but: h8300 (compiler internal error),
>>> and mn10300, parisc, score (cross compilers not available in
>>> ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
>>>
>>> For testing, you can pull from:
>>>
>>> git://github.com/fweisbec/linux-dynticks.git
>>> 	rcu/idle-fix-v2 
>>>
>>> Thanks.
>>
>> I have queued these on -rcu branch rcu/idle:
>>
>> 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
>>
>> This problem has been in place since 3.3, so it is hard to argue that
>> it is a regression for this merge window.  I have therefore queued it
>> for 3.7.
> 
> I don't follow that; I would expect any serious bug fix (serious enough
> for a stable update) to be acceptable for 3.6 at this point.
> 
> If the regression occurred in 3.3, then the cc lines should be something
> like:
> 
>     Cc: <stable@vger.kernel.org> # 3.3+
> 
> and not the current:
> 
>     Cc: 3.2.x.. <stable@vger.kernel.org>

The Alpha patches fix an even earlier regression resulting in RCU CPU
stalls on an SMP kernel built for generic Alpha (which includes the
current Debian 3.2-alpha-smp kernel) and renders the kernel pretty much
unuseable.  I've only tested the two alpha patches together but maybe
just the first patch (1/11 alpha: Fix preemption handling in idle loop)
might be needed to fix the problem in 3.2.   I'll test and let you know.

Cheers
Michael.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]   ` <1345857554.4840.43.camel@deadeye.wl.decadent.org.uk>
  2012-08-25  2:10     ` Michael Cree
@ 2012-08-25  3:50     ` Paul E. McKenney
       [not found]     ` <20120825035047.GB3436@linux.vnet.ibm.com>
                       ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Paul E. McKenney @ 2012-08-25  3:50 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Frederic Weisbecker, LKML, Chris Zankel, 3.2.x.., Chen Liqin,
	Lennox Wu, James E.J. Bottomley, Helge Deller, Parisc,
	David Howells, Koichi Yasutake, Geert Uytterhoeven, m68k,
	Hirokazu Takata, Yoshinori Sato, Mikael Starvik, Jesper Nilsson,
	Cris, Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha

On Sat, Aug 25, 2012 at 02:19:14AM +0100, Ben Hutchings wrote:
> On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
> > On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
> > > Hi,
> > > 
> > > Changes since v1:
> > > 
> > > - Fixed preempt handling in alpha idle loop
> > > - added ack from Geert
> > > - fixed stable email address, sorry :-/
> > > 
> > > This time I built tested everywhere but: h8300 (compiler internal error),
> > > and mn10300, parisc, score (cross compilers not available in
> > > ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
> > > 
> > > For testing, you can pull from:
> > > 
> > > git://github.com/fweisbec/linux-dynticks.git
> > > 	rcu/idle-fix-v2 
> > > 
> > > Thanks.
> > 
> > I have queued these on -rcu branch rcu/idle:
> > 
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> > 
> > This problem has been in place since 3.3, so it is hard to argue that
> > it is a regression for this merge window.  I have therefore queued it
> > for 3.7.
> 
> I don't follow that; I would expect any serious bug fix (serious enough
> for a stable update) to be acceptable for 3.6 at this point.

OK, if any of the arch maintainers wishes to submit the patch to 3.6,
they are free to do so -- just let me know and I will drop the patch from
my tree.

That said, all this does is cause spurious warnings to be printed, so
not sure it really qualifies as serious.  But I am happy to leave that
decision with the individual arch maintainers -- it is their arch,
after all, so their decision.

							Thanx, Paul

> If the regression occurred in 3.3, then the cc lines should be something
> like:
> 
>     Cc: <stable@vger.kernel.org> # 3.3+
> 
> and not the current:
> 
>     Cc: 3.2.x.. <stable@vger.kernel.org>
> 
> (Note, version annotations should be on the right of the address, not in
> the 'real name' position on the left.)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]     ` <20120825035047.GB3436@linux.vnet.ibm.com>
@ 2012-08-25 13:16       ` Frederic Weisbecker
       [not found]       ` <20120825131647.GA1994@somewhere>
  1 sibling, 0 replies; 15+ messages in thread
From: Frederic Weisbecker @ 2012-08-25 13:16 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Ben Hutchings, LKML, Chris Zankel, 3.2.x.., Chen Liqin, Lennox Wu,
	James E.J. Bottomley, Helge Deller, Parisc, David Howells,
	Koichi Yasutake, Geert Uytterhoeven, m68k, Hirokazu Takata,
	Yoshinori Sato, Mikael Starvik, Jesper Nilsson, Cris,
	Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha,
	Michael Cree <mcree@

On Fri, Aug 24, 2012 at 08:50:47PM -0700, Paul E. McKenney wrote:
> On Sat, Aug 25, 2012 at 02:19:14AM +0100, Ben Hutchings wrote:
> > On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
> > > On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
> > > > Hi,
> > > > 
> > > > Changes since v1:
> > > > 
> > > > - Fixed preempt handling in alpha idle loop
> > > > - added ack from Geert
> > > > - fixed stable email address, sorry :-/
> > > > 
> > > > This time I built tested everywhere but: h8300 (compiler internal error),
> > > > and mn10300, parisc, score (cross compilers not available in
> > > > ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
> > > > 
> > > > For testing, you can pull from:
> > > > 
> > > > git://github.com/fweisbec/linux-dynticks.git
> > > > 	rcu/idle-fix-v2 
> > > > 
> > > > Thanks.
> > > 
> > > I have queued these on -rcu branch rcu/idle:
> > > 
> > > 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> > > 
> > > This problem has been in place since 3.3, so it is hard to argue that
> > > it is a regression for this merge window.  I have therefore queued it
> > > for 3.7.
> > 
> > I don't follow that; I would expect any serious bug fix (serious enough
> > for a stable update) to be acceptable for 3.6 at this point.
> 
> OK, if any of the arch maintainers wishes to submit the patch to 3.6,
> they are free to do so -- just let me know and I will drop the patch from
> my tree.
> 
> That said, all this does is cause spurious warnings to be printed, so
> not sure it really qualifies as serious.  But I am happy to leave that
> decision with the individual arch maintainers -- it is their arch,
> after all, so their decision.

Couldn't that cause hung tasks due to long lasting synchronize_rcu() ?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]       ` <20120825131647.GA1994@somewhere>
@ 2012-08-25 16:18         ` Paul E. McKenney
       [not found]         ` <20120825161806.GD3436@linux.vnet.ibm.com>
  1 sibling, 0 replies; 15+ messages in thread
From: Paul E. McKenney @ 2012-08-25 16:18 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: Ben Hutchings, LKML, Chris Zankel, 3.2.x.., Chen Liqin, Lennox Wu,
	James E.J. Bottomley, Helge Deller, Parisc, David Howells,
	Koichi Yasutake, Geert Uytterhoeven, m68k, Hirokazu Takata,
	Yoshinori Sato, Mikael Starvik, Jesper Nilsson, Cris,
	Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha,
	Michael Cree <mcree@

On Sat, Aug 25, 2012 at 03:16:49PM +0200, Frederic Weisbecker wrote:
> On Fri, Aug 24, 2012 at 08:50:47PM -0700, Paul E. McKenney wrote:
> > On Sat, Aug 25, 2012 at 02:19:14AM +0100, Ben Hutchings wrote:
> > > On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
> > > > On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
> > > > > Hi,
> > > > > 
> > > > > Changes since v1:
> > > > > 
> > > > > - Fixed preempt handling in alpha idle loop
> > > > > - added ack from Geert
> > > > > - fixed stable email address, sorry :-/
> > > > > 
> > > > > This time I built tested everywhere but: h8300 (compiler internal error),
> > > > > and mn10300, parisc, score (cross compilers not available in
> > > > > ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
> > > > > 
> > > > > For testing, you can pull from:
> > > > > 
> > > > > git://github.com/fweisbec/linux-dynticks.git
> > > > > 	rcu/idle-fix-v2 
> > > > > 
> > > > > Thanks.
> > > > 
> > > > I have queued these on -rcu branch rcu/idle:
> > > > 
> > > > 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> > > > 
> > > > This problem has been in place since 3.3, so it is hard to argue that
> > > > it is a regression for this merge window.  I have therefore queued it
> > > > for 3.7.
> > > 
> > > I don't follow that; I would expect any serious bug fix (serious enough
> > > for a stable update) to be acceptable for 3.6 at this point.
> > 
> > OK, if any of the arch maintainers wishes to submit the patch to 3.6,
> > they are free to do so -- just let me know and I will drop the patch from
> > my tree.
> > 
> > That said, all this does is cause spurious warnings to be printed, so
> > not sure it really qualifies as serious.  But I am happy to leave that
> > decision with the individual arch maintainers -- it is their arch,
> > after all, so their decision.
> 
> Couldn't that cause hung tasks due to long lasting synchronize_rcu() ?

In theory, definitely.  In practice, they haven't been running into it,
or they would be reporting hangs.

							Thanx, Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]         ` <20120825161806.GD3436@linux.vnet.ibm.com>
@ 2012-08-25 21:15           ` Michael Cree
       [not found]           ` <5039406F.9040604@orcon.net.nz>
  1 sibling, 0 replies; 15+ messages in thread
From: Michael Cree @ 2012-08-25 21:15 UTC (permalink / raw)
  To: paulmck
  Cc: Frederic Weisbecker, Ben Hutchings, LKML, Chris Zankel, 3.2.x..,
	Chen Liqin, Lennox Wu, James E.J. Bottomley, Helge Deller, Parisc,
	David Howells, Koichi Yasutake, Geert Uytterhoeven, m68k,
	Hirokazu Takata, Yoshinori Sato, Mikael Starvik, Jesper Nilsson,
	Cris, Richard Henderson, Ivan Kokshaysky, Matt Turner,
	alpha <linux-al>

On 26/08/12 04:18, Paul E. McKenney wrote:
> On Sat, Aug 25, 2012 at 03:16:49PM +0200, Frederic Weisbecker wrote:
>> On Fri, Aug 24, 2012 at 08:50:47PM -0700, Paul E. McKenney wrote:
>>> On Sat, Aug 25, 2012 at 02:19:14AM +0100, Ben Hutchings wrote:
>>>> On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
>>>>> On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Changes since v1:
>>>>>>
>>>>>> - Fixed preempt handling in alpha idle loop
>>>>>> - added ack from Geert
>>>>>> - fixed stable email address, sorry :-/
>>>>>>
>>>>>> This time I built tested everywhere but: h8300 (compiler internal error),
>>>>>> and mn10300, parisc, score (cross compilers not available in
>>>>>> ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
>>>>>>
>>>>>> For testing, you can pull from:
>>>>>>
>>>>>> git://github.com/fweisbec/linux-dynticks.git
>>>>>> 	rcu/idle-fix-v2 
>>>>>>
>>>>>> Thanks.
>>>>>
>>>>> I have queued these on -rcu branch rcu/idle:
>>>>>
>>>>> 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
>>>>>
>>>>> This problem has been in place since 3.3, so it is hard to argue that
>>>>> it is a regression for this merge window.  I have therefore queued it
>>>>> for 3.7.
>>>>
>>>> I don't follow that; I would expect any serious bug fix (serious enough
>>>> for a stable update) to be acceptable for 3.6 at this point.
>>>
>>> OK, if any of the arch maintainers wishes to submit the patch to 3.6,
>>> they are free to do so -- just let me know and I will drop the patch from
>>> my tree.
>>>
>>> That said, all this does is cause spurious warnings to be printed, so
>>> not sure it really qualifies as serious.  But I am happy to leave that
>>> decision with the individual arch maintainers -- it is their arch,
>>> after all, so their decision.
>>
>> Couldn't that cause hung tasks due to long lasting synchronize_rcu() ?
> 
> In theory, definitely.  In practice, they haven't been running into it,
> or they would be reporting hangs.

I am hereby reporting that RCU CPU stall warnings and hung tasks are
being experienced on SMP kernels built for generic Alpha. This problem
dates back quite a few kernel releases. The discussed patches appear to
fix the problem.

A backport to the 3.2 kernel, of at least the Alpha patches, would be
very much appreciated! :-)

Cheers
Michael.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]           ` <5039406F.9040604@orcon.net.nz>
@ 2012-08-26  0:12             ` Paul E. McKenney
       [not found]             ` <20120826001233.GH3436@linux.vnet.ibm.com>
  1 sibling, 0 replies; 15+ messages in thread
From: Paul E. McKenney @ 2012-08-26  0:12 UTC (permalink / raw)
  To: Michael Cree
  Cc: Frederic Weisbecker, Ben Hutchings, LKML, Chris Zankel, 3.2.x..,
	Chen Liqin, Lennox Wu, James E.J. Bottomley, Helge Deller, Parisc,
	David Howells, Koichi Yasutake, Geert Uytterhoeven, m68k,
	Hirokazu Takata, Yoshinori Sato, Mikael Starvik, Jesper Nilsson,
	Cris, Richard Henderson, Ivan Kokshaysky, Matt Turner,
	alpha <linux-al>

On Sun, Aug 26, 2012 at 09:15:27AM +1200, Michael Cree wrote:
> On 26/08/12 04:18, Paul E. McKenney wrote:
> > On Sat, Aug 25, 2012 at 03:16:49PM +0200, Frederic Weisbecker wrote:
> >> On Fri, Aug 24, 2012 at 08:50:47PM -0700, Paul E. McKenney wrote:
> >>> On Sat, Aug 25, 2012 at 02:19:14AM +0100, Ben Hutchings wrote:
> >>>> On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
> >>>>> On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> Changes since v1:
> >>>>>>
> >>>>>> - Fixed preempt handling in alpha idle loop
> >>>>>> - added ack from Geert
> >>>>>> - fixed stable email address, sorry :-/
> >>>>>>
> >>>>>> This time I built tested everywhere but: h8300 (compiler internal error),
> >>>>>> and mn10300, parisc, score (cross compilers not available in
> >>>>>> ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
> >>>>>>
> >>>>>> For testing, you can pull from:
> >>>>>>
> >>>>>> git://github.com/fweisbec/linux-dynticks.git
> >>>>>> 	rcu/idle-fix-v2 
> >>>>>>
> >>>>>> Thanks.
> >>>>>
> >>>>> I have queued these on -rcu branch rcu/idle:
> >>>>>
> >>>>> 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> >>>>>
> >>>>> This problem has been in place since 3.3, so it is hard to argue that
> >>>>> it is a regression for this merge window.  I have therefore queued it
> >>>>> for 3.7.
> >>>>
> >>>> I don't follow that; I would expect any serious bug fix (serious enough
> >>>> for a stable update) to be acceptable for 3.6 at this point.
> >>>
> >>> OK, if any of the arch maintainers wishes to submit the patch to 3.6,
> >>> they are free to do so -- just let me know and I will drop the patch from
> >>> my tree.
> >>>
> >>> That said, all this does is cause spurious warnings to be printed, so
> >>> not sure it really qualifies as serious.  But I am happy to leave that
> >>> decision with the individual arch maintainers -- it is their arch,
> >>> after all, so their decision.
> >>
> >> Couldn't that cause hung tasks due to long lasting synchronize_rcu() ?
> > 
> > In theory, definitely.  In practice, they haven't been running into it,
> > or they would be reporting hangs.
> 
> I am hereby reporting that RCU CPU stall warnings and hung tasks are
> being experienced on SMP kernels built for generic Alpha. This problem
> dates back quite a few kernel releases. The discussed patches appear to
> fix the problem.

OK, fair enough.

> A backport to the 3.2 kernel, of at least the Alpha patches, would be
> very much appreciated! :-)

Both Alpha patches should apply as-is back to 3.3, and should also fix
the problem.  Could you please check this on the versions of interest?

If you are seeing something like this on 3.2 or earlier, you have some
other problem that needs to be tracked down separately.

							Thanx, Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]             ` <20120826001233.GH3436@linux.vnet.ibm.com>
@ 2012-08-26  9:21               ` Tobias Klausmann
       [not found]               ` <20120826092137.GA50543@kaini.schwarzvogel.de>
  1 sibling, 0 replies; 15+ messages in thread
From: Tobias Klausmann @ 2012-08-26  9:21 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Michael Cree, Frederic Weisbecker, Ben Hutchings, LKML,
	Chris Zankel, 3.2.x.., Chen Liqin, Lennox Wu,
	James E.J. Bottomley, Helge Deller, Parisc, David Howells,
	Koichi Yasutake, Geert Uytterhoeven, m68k, Hirokazu Takata,
	Yoshinori Sato, Mikael Starvik, Jesper Nilsson, Cris,
	Richard Henderson, Ivan Kokshaysky

Hi! 

On Sat, 25 Aug 2012, Paul E. McKenney wrote:
> Both Alpha patches should apply as-is back to 3.3, and should also fix
> the problem.  Could you please check this on the versions of interest?

I just now tried them on top of 3.3.8 from linux-stable.git.
While they apply cleanly, I get a compile failure:

  CC      arch/alpha/kernel/process.o
arch/alpha/kernel/process.c: In function 'cpu_idle':
arch/alpha/kernel/process.c:64: error: implicit declaration of function 'schedule_preempt_disabled'
make[1]: *** [arch/alpha/kernel/process.o] Error 1
make: *** [arch/alpha/kernel] Error 2

AFAICT, schedule_preempt_disabled() was only introduced in 3.4
and thus needs to be backported for 3.3.

Regards,
Tobias

-- 
panic("%s: CORRUPTED BTREE OR SOMETHING", __FUNCTION__);
        linux-2.6.6/fs/xfs/xfs_bmap.c

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]               ` <20120826092137.GA50543@kaini.schwarzvogel.de>
@ 2012-09-10 21:53                 ` Frederic Weisbecker
  0 siblings, 0 replies; 15+ messages in thread
From: Frederic Weisbecker @ 2012-09-10 21:53 UTC (permalink / raw)
  To: Paul E. McKenney, Michael Cree, Ben Hutchings, LKML, Chris Zankel,
	3.2.x.., Chen Liqin, Lennox Wu, James E.J. Bottomley,
	Helge Deller, Parisc, David Howells, Koichi Yasutake,
	Geert Uytterhoeven, m68k, Hirokazu Takata, Yoshinori Sato,
	Mikael Starvik, Jesper Nilsson, Cris, Richard Henderson,
	Ivan Kokshaysky, Matt

On Sun, Aug 26, 2012 at 11:21:37AM +0200, Tobias Klausmann wrote:
> Hi! 
> 
> On Sat, 25 Aug 2012, Paul E. McKenney wrote:
> > Both Alpha patches should apply as-is back to 3.3, and should also fix
> > the problem.  Could you please check this on the versions of interest?
> 
> I just now tried them on top of 3.3.8 from linux-stable.git.
> While they apply cleanly, I get a compile failure:
> 
>   CC      arch/alpha/kernel/process.o
> arch/alpha/kernel/process.c: In function 'cpu_idle':
> arch/alpha/kernel/process.c:64: error: implicit declaration of function 'schedule_preempt_disabled'
> make[1]: *** [arch/alpha/kernel/process.o] Error 1
> make: *** [arch/alpha/kernel] Error 2
> 
> AFAICT, schedule_preempt_disabled() was only introduced in 3.4
> and thus needs to be backported for 3.3.

Please try with this instead:

	preempt_enable_no_resched();
	schedule();
	preempt_disable();

Thanks.

> 
> Regards,
> Tobias
> 
> -- 
> panic("%s: CORRUPTED BTREE OR SOMETHING", __FUNCTION__);
>         linux-2.6.6/fs/xfs/xfs_bmap.c

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]   ` <1345857554.4840.43.camel@deadeye.wl.decadent.org.uk>
                       ` (2 preceding siblings ...)
       [not found]     ` <20120825035047.GB3436@linux.vnet.ibm.com>
@ 2012-09-10 21:56     ` Frederic Weisbecker
       [not found]     ` <20120910215541.GE21277@somewhere.redhat.com>
  4 siblings, 0 replies; 15+ messages in thread
From: Frederic Weisbecker @ 2012-09-10 21:56 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: paulmck, LKML, Chris Zankel, 3.2.x.., Chen Liqin, Lennox Wu,
	James E.J. Bottomley, Helge Deller, Parisc, David Howells,
	Koichi Yasutake, Geert Uytterhoeven, m68k, Hirokazu Takata,
	Yoshinori Sato, Mikael Starvik, Jesper Nilsson, Cris,
	Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha,
	Michael Cree

On Sat, Aug 25, 2012 at 02:19:14AM +0100, Ben Hutchings wrote:
> On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
> > On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
> > > Hi,
> > > 
> > > Changes since v1:
> > > 
> > > - Fixed preempt handling in alpha idle loop
> > > - added ack from Geert
> > > - fixed stable email address, sorry :-/
> > > 
> > > This time I built tested everywhere but: h8300 (compiler internal error),
> > > and mn10300, parisc, score (cross compilers not available in
> > > ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
> > > 
> > > For testing, you can pull from:
> > > 
> > > git://github.com/fweisbec/linux-dynticks.git
> > > 	rcu/idle-fix-v2 
> > > 
> > > Thanks.
> > 
> > I have queued these on -rcu branch rcu/idle:
> > 
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> > 
> > This problem has been in place since 3.3, so it is hard to argue that
> > it is a regression for this merge window.  I have therefore queued it
> > for 3.7.
> 
> I don't follow that; I would expect any serious bug fix (serious enough
> for a stable update) to be acceptable for 3.6 at this point.
> 
> If the regression occurred in 3.3, then the cc lines should be something
> like:
> 
>     Cc: <stable@vger.kernel.org> # 3.3+
> 
> and not the current:
> 
>     Cc: 3.2.x.. <stable@vger.kernel.org>
> 
> (Note, version annotations should be on the right of the address, not in
> the 'real name' position on the left.)

Ah indeed.

Hmm, I don't understand why we took that convention while we can reuse the name
that precedes the email to put that information.

Anyway, should I resend the patchset with this thing fixed?

Thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
       [not found]     ` <20120910215541.GE21277@somewhere.redhat.com>
@ 2012-09-10 22:58       ` Paul E. McKenney
  2012-09-11 12:35         ` Frederic Weisbecker
  0 siblings, 1 reply; 15+ messages in thread
From: Paul E. McKenney @ 2012-09-10 22:58 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: Ben Hutchings, LKML, Chris Zankel, 3.2.x.., Chen Liqin, Lennox Wu,
	James E.J. Bottomley, Helge Deller, Parisc, David Howells,
	Koichi Yasutake, Geert Uytterhoeven, m68k, Hirokazu Takata,
	Yoshinori Sato, Mikael Starvik, Jesper Nilsson, Cris,
	Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha,
	Michael Cree <mcree@

On Mon, Sep 10, 2012 at 11:56:08PM +0200, Frederic Weisbecker wrote:
> On Sat, Aug 25, 2012 at 02:19:14AM +0100, Ben Hutchings wrote:
> > On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote:
> > > On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote:
> > > > Hi,
> > > > 
> > > > Changes since v1:
> > > > 
> > > > - Fixed preempt handling in alpha idle loop
> > > > - added ack from Geert
> > > > - fixed stable email address, sorry :-/
> > > > 
> > > > This time I built tested everywhere but: h8300 (compiler internal error),
> > > > and mn10300, parisc, score (cross compilers not available in
> > > > ftp://ftp.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/)
> > > > 
> > > > For testing, you can pull from:
> > > > 
> > > > git://github.com/fweisbec/linux-dynticks.git
> > > > 	rcu/idle-fix-v2 
> > > > 
> > > > Thanks.
> > > 
> > > I have queued these on -rcu branch rcu/idle:
> > > 
> > > 	git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> > > 
> > > This problem has been in place since 3.3, so it is hard to argue that
> > > it is a regression for this merge window.  I have therefore queued it
> > > for 3.7.
> > 
> > I don't follow that; I would expect any serious bug fix (serious enough
> > for a stable update) to be acceptable for 3.6 at this point.
> > 
> > If the regression occurred in 3.3, then the cc lines should be something
> > like:
> > 
> >     Cc: <stable@vger.kernel.org> # 3.3+
> > 
> > and not the current:
> > 
> >     Cc: 3.2.x.. <stable@vger.kernel.org>
> > 
> > (Note, version annotations should be on the right of the address, not in
> > the 'real name' position on the left.)
> 
> Ah indeed.
> 
> Hmm, I don't understand why we took that convention while we can reuse the name
> that precedes the email to put that information.
> 
> Anyway, should I resend the patchset with this thing fixed?

Please feel free to do so.  ;-)

							Thanx, Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2
  2012-09-10 22:58       ` Paul E. McKenney
@ 2012-09-11 12:35         ` Frederic Weisbecker
  0 siblings, 0 replies; 15+ messages in thread
From: Frederic Weisbecker @ 2012-09-11 12:35 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Ben Hutchings, LKML, Chris Zankel, 3.2.x.., Chen Liqin, Lennox Wu,
	James E.J. Bottomley, Helge Deller, Parisc, David Howells,
	Koichi Yasutake, Geert Uytterhoeven, m68k, Hirokazu Takata,
	Yoshinori Sato, Mikael Starvik, Jesper Nilsson, Cris,
	Richard Henderson, Ivan Kokshaysky, Matt Turner, alpha,
	Michael Cree <mcree@

On Mon, Sep 10, 2012 at 03:58:45PM -0700, Paul E. McKenney wrote:
> > Anyway, should I resend the patchset with this thing fixed?
> 
> Please feel free to do so.  ;-)
> 
> 							Thanx, Paul
> 

So here it is.

On the menu for the updated branch:

- fixed stable tags (use # 3.3+)
- not sure what to do with "alpha: Fix preemption handling in idle loop",
  tag as stable or not?
- added tested-by Michael Cree <mcree@orcon.net.nz> for alpha patches
- propagate rename to rcu_user_*_after_irq() in the commit changelog
- remove trailing #endif in "rcu: New rcu_user_enter_after_irq() and rcu_user_exit_after_irq() APIs"
  and early rcu_user_hooks_switch() header as well (reported by WU Fenguang).
- add rcu_user_hooks_switch() header in "rcu: Switch task's syscall hooks on context switch"

I believe this all should also fix what WU Fenguang reported:

	[rcu:rcu:next 54/82] include/linux/rcupdate.h:202:20: error: redefinition of 'rcu_user_exit'
	[rcu:rcu:next 54/82] include/linux/rcupdate.h:401:19: error: redefinition of 'rcu_read_lock_bh_held'
	[rcu:rcu:idle 2/27] include/linux/rcupdate.h:969:2: error: #endif without #if

I'm not reposting the patches because few things have actually changed, except a few neats and some stuff
that have been moved from a patch to another to unbreak bisection. But the end result is about the same.
You can check the difference with a git diff between our branches.

If you want to, though, I can repost the patches.

This is pullable from:

git://github.com/fweisbec/linux-dynticks.git
	rcu/idle-for-v3.7

Thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-09-11 12:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1345733915-20040-1-git-send-email-fweisbec@gmail.com>
2012-08-23 14:58 ` [PATCH 07/11] m68k: Add missing RCU idle APIs on idle loop Frederic Weisbecker
2012-08-24 21:26 ` [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2 Paul E. McKenney
2012-08-25  1:19   ` Ben Hutchings
     [not found]   ` <1345857554.4840.43.camel@deadeye.wl.decadent.org.uk>
2012-08-25  2:10     ` Michael Cree
2012-08-25  3:50     ` Paul E. McKenney
     [not found]     ` <20120825035047.GB3436@linux.vnet.ibm.com>
2012-08-25 13:16       ` Frederic Weisbecker
     [not found]       ` <20120825131647.GA1994@somewhere>
2012-08-25 16:18         ` Paul E. McKenney
     [not found]         ` <20120825161806.GD3436@linux.vnet.ibm.com>
2012-08-25 21:15           ` Michael Cree
     [not found]           ` <5039406F.9040604@orcon.net.nz>
2012-08-26  0:12             ` Paul E. McKenney
     [not found]             ` <20120826001233.GH3436@linux.vnet.ibm.com>
2012-08-26  9:21               ` Tobias Klausmann
     [not found]               ` <20120826092137.GA50543@kaini.schwarzvogel.de>
2012-09-10 21:53                 ` Frederic Weisbecker
2012-09-10 21:56     ` Frederic Weisbecker
     [not found]     ` <20120910215541.GE21277@somewhere.redhat.com>
2012-09-10 22:58       ` Paul E. McKenney
2012-09-11 12:35         ` Frederic Weisbecker
2012-08-23 14:58 Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox