All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: lkp@lists.01.org
Subject: Re: [rcu] [ INFO: suspicious RCU usage. ]
Date: Wed, 04 Feb 2015 17:10:56 +0100	[thread overview]
Message-ID: <1423066256.24415.13.camel@AMDC1943> (raw)
In-Reply-To: <20150204155615.GF5370@linux.vnet.ibm.com>

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

On śro, 2015-02-04 at 07:56 -0800, Paul E. McKenney wrote:
> On Wed, Feb 04, 2015 at 04:22:28PM +0100, Krzysztof Kozlowski wrote:
> > 
> > Actually the timeout versions but I think that doesn't matter.
> > The wait_on_bit will busy-loop with testing for the bit. Inside the loop
> > it calls the 'action' which in my case will be bit_wait_io_timeout().
> > This calls schedule_timeout().
> 
> Ah, good point.
> 
> > See proof of concept in attachment. One observed issue: hot unplug from
> > commandline takes a lot more time. About 7 seconds instead of ~0.5.
> > Probably I did something wrong.
> 
> Well, you do set the timeout to five seconds, and so if the condition
> does not get set before the surviving CPU finds its way to the
> out_of_line_wait_on_bit_timeout(), you are guaranteed to wait for at
> least five seconds.
>
> One alternative approach would be to have a loop around a series of
> shorter waits.  Other thoughts?

Right! That was the issue. It seems it works. I'll think also on
self-adapting interval as you said below. I'll test it more and send a
patch.

Best regards,
Krzysztof

> 
> > > You know, this situation is giving me a bad case of nostalgia for the
> > > old Sequent Symmetry and NUMA-Q hardware.  On those platforms, the
> > > outgoing CPU could turn itself off, and thus didn't need to tell some
> > > other CPU when it was ready to be turned off.  Seems to me that this
> > > self-turn-off capability would be a great feature for future systems!
> > 
> > There are a lot more issues with hotplug on ARM...
> 
> Just trying to clean up this particular corner at the moment.  ;-)
> 
> > Patch/RFC attached.
> 
> Again, I believe that you will need to loop over a shorter timeout
> in order to get reasonable latencies.  If waiting a millisecond at
> a time is an energy-efficiency concern (don't know why it would be
> in this rare case, but...), then one approach would be to start
> with very short waits, then increase the wait time, for example,
> doubling the wait time on each pass through the loop would result
> in a smallish number of wakeups, but would mean that you waited
> no more than twice as long as necessary.
> 
> Thoughts?



WARNING: multiple messages have this Message-ID (diff)
From: k.kozlowski@samsung.com (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [rcu] [ INFO: suspicious RCU usage. ]
Date: Wed, 04 Feb 2015 17:10:56 +0100	[thread overview]
Message-ID: <1423066256.24415.13.camel@AMDC1943> (raw)
In-Reply-To: <20150204155615.GF5370@linux.vnet.ibm.com>

On ?ro, 2015-02-04 at 07:56 -0800, Paul E. McKenney wrote:
> On Wed, Feb 04, 2015 at 04:22:28PM +0100, Krzysztof Kozlowski wrote:
> > 
> > Actually the timeout versions but I think that doesn't matter.
> > The wait_on_bit will busy-loop with testing for the bit. Inside the loop
> > it calls the 'action' which in my case will be bit_wait_io_timeout().
> > This calls schedule_timeout().
> 
> Ah, good point.
> 
> > See proof of concept in attachment. One observed issue: hot unplug from
> > commandline takes a lot more time. About 7 seconds instead of ~0.5.
> > Probably I did something wrong.
> 
> Well, you do set the timeout to five seconds, and so if the condition
> does not get set before the surviving CPU finds its way to the
> out_of_line_wait_on_bit_timeout(), you are guaranteed to wait for at
> least five seconds.
>
> One alternative approach would be to have a loop around a series of
> shorter waits.  Other thoughts?

Right! That was the issue. It seems it works. I'll think also on
self-adapting interval as you said below. I'll test it more and send a
patch.

Best regards,
Krzysztof

> 
> > > You know, this situation is giving me a bad case of nostalgia for the
> > > old Sequent Symmetry and NUMA-Q hardware.  On those platforms, the
> > > outgoing CPU could turn itself off, and thus didn't need to tell some
> > > other CPU when it was ready to be turned off.  Seems to me that this
> > > self-turn-off capability would be a great feature for future systems!
> > 
> > There are a lot more issues with hotplug on ARM...
> 
> Just trying to clean up this particular corner at the moment.  ;-)
> 
> > Patch/RFC attached.
> 
> Again, I believe that you will need to loop over a shorter timeout
> in order to get reasonable latencies.  If waiting a millisecond at
> a time is an energy-efficiency concern (don't know why it would be
> in this rare case, but...), then one approach would be to start
> with very short waits, then increase the wait time, for example,
> doubling the wait time on each pass through the loop would result
> in a smallish number of wakeups, but would mean that you waited
> no more than twice as long as necessary.
> 
> Thoughts?

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: paulmck@linux.vnet.ibm.com
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Fengguang Wu <fengguang.wu@intel.com>, LKP <lkp@01.org>,
	linux-kernel@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>, MarkRutland <mark.rutland@arm.com>
Subject: Re: [rcu] [ INFO: suspicious RCU usage. ]
Date: Wed, 04 Feb 2015 17:10:56 +0100	[thread overview]
Message-ID: <1423066256.24415.13.camel@AMDC1943> (raw)
In-Reply-To: <20150204155615.GF5370@linux.vnet.ibm.com>

On śro, 2015-02-04 at 07:56 -0800, Paul E. McKenney wrote:
> On Wed, Feb 04, 2015 at 04:22:28PM +0100, Krzysztof Kozlowski wrote:
> > 
> > Actually the timeout versions but I think that doesn't matter.
> > The wait_on_bit will busy-loop with testing for the bit. Inside the loop
> > it calls the 'action' which in my case will be bit_wait_io_timeout().
> > This calls schedule_timeout().
> 
> Ah, good point.
> 
> > See proof of concept in attachment. One observed issue: hot unplug from
> > commandline takes a lot more time. About 7 seconds instead of ~0.5.
> > Probably I did something wrong.
> 
> Well, you do set the timeout to five seconds, and so if the condition
> does not get set before the surviving CPU finds its way to the
> out_of_line_wait_on_bit_timeout(), you are guaranteed to wait for at
> least five seconds.
>
> One alternative approach would be to have a loop around a series of
> shorter waits.  Other thoughts?

Right! That was the issue. It seems it works. I'll think also on
self-adapting interval as you said below. I'll test it more and send a
patch.

Best regards,
Krzysztof

> 
> > > You know, this situation is giving me a bad case of nostalgia for the
> > > old Sequent Symmetry and NUMA-Q hardware.  On those platforms, the
> > > outgoing CPU could turn itself off, and thus didn't need to tell some
> > > other CPU when it was ready to be turned off.  Seems to me that this
> > > self-turn-off capability would be a great feature for future systems!
> > 
> > There are a lot more issues with hotplug on ARM...
> 
> Just trying to clean up this particular corner at the moment.  ;-)
> 
> > Patch/RFC attached.
> 
> Again, I believe that you will need to loop over a shorter timeout
> in order to get reasonable latencies.  If waiting a millisecond at
> a time is an energy-efficiency concern (don't know why it would be
> in this rare case, but...), then one approach would be to start
> with very short waits, then increase the wait time, for example,
> doubling the wait time on each pass through the loop would result
> in a smallish number of wakeups, but would mean that you waited
> no more than twice as long as necessary.
> 
> Thoughts?



  reply	other threads:[~2015-02-04 16:10 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-01  2:59 [rcu] [ INFO: suspicious RCU usage. ] Fengguang Wu
2015-02-01  2:59 ` Fengguang Wu
2015-02-03 10:01 ` Krzysztof Kozlowski
2015-02-03 10:01   ` Krzysztof Kozlowski
2015-02-03 16:27   ` Paul E. McKenney
2015-02-03 16:27     ` Paul E. McKenney
2015-02-04 11:39     ` Krzysztof Kozlowski
2015-02-04 11:39       ` Krzysztof Kozlowski
2015-02-04 11:39       ` Krzysztof Kozlowski
2015-02-04 13:00       ` Russell King - ARM Linux
2015-02-04 13:00         ` Russell King - ARM Linux
2015-02-04 13:00         ` Russell King - ARM Linux
2015-02-04 13:14         ` Paul E. McKenney
2015-02-04 13:14           ` Paul E. McKenney
2015-02-04 13:14           ` Paul E. McKenney
2015-02-04 14:16           ` Krzysztof Kozlowski
2015-02-04 14:16             ` Krzysztof Kozlowski
2015-02-04 14:16             ` Krzysztof Kozlowski
2015-02-04 15:10             ` Paul E. McKenney
2015-02-04 15:10               ` Paul E. McKenney
2015-02-04 15:10               ` Paul E. McKenney
2015-02-04 15:16               ` Russell King - ARM Linux
2015-02-04 15:16                 ` Russell King - ARM Linux
2015-02-04 15:16                 ` Russell King - ARM Linux
2015-02-04 15:46                 ` Paul E. McKenney
2015-02-04 15:46                   ` Paul E. McKenney
2015-02-04 15:46                   ` Paul E. McKenney
2015-02-04 15:22               ` Krzysztof Kozlowski
2015-02-04 15:22                 ` Krzysztof Kozlowski
2015-02-04 15:22                 ` Krzysztof Kozlowski
2015-02-04 15:56                 ` Paul E. McKenney
2015-02-04 15:56                   ` Paul E. McKenney
2015-02-04 15:56                   ` Paul E. McKenney
2015-02-04 16:10                   ` Krzysztof Kozlowski [this message]
2015-02-04 16:10                     ` Krzysztof Kozlowski
2015-02-04 16:10                     ` Krzysztof Kozlowski
2015-02-04 16:28                     ` Paul E. McKenney
2015-02-04 16:28                       ` Paul E. McKenney
2015-02-04 16:28                       ` Paul E. McKenney
2015-02-04 16:43                       ` Krzysztof Kozlowski
2015-02-04 16:43                         ` Krzysztof Kozlowski
2015-02-04 16:43                         ` Krzysztof Kozlowski
2015-02-04 13:13       ` Paul E. McKenney
2015-02-04 13:13         ` Paul E. McKenney
2015-02-04 13:13         ` Paul E. McKenney

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=1423066256.24415.13.camel@AMDC1943 \
    --to=k.kozlowski@samsung.com \
    --cc=lkp@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.