public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 3.0.23-rt39 BUG: scheduling while atomic, _cpu_down()
@ 2012-03-10  1:51 Frank Rowand
  2012-03-10  2:03 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Rowand @ 2012-03-10  1:51 UTC (permalink / raw)
  To: tglx, rostedt; +Cc: linux-kernel, linux-rt-users

Hi Thomas,
(and Steve, since you've been mucking about in the hotplug code,)

Yet another bit of fallout related to hotplug.

This appears to affect 3.0-rt1, 3.0.23-rt29, and 3.2.9-rt17.
(Thus probably all 3.x versions, but I haven't been masochistic
enough to check.)

If not defined CONFIG_PREEMPT_RT_FULL then

  - hotplug_lock() is a mutex_lock()
  - cpu_hotplug_begin() calls hotplug_lock()
  - _cpu_down() calls cpu_hotplug_begin() with preemption
    disabled (disabled by the migrate_disable())

The call to cpu_hotplug_begin() is not in a preempt disabled
region until hotplug-use-migrate-disable.patch.  This patch
moves the preempt_enable() (aka migrate_enable()) from just
before calling cpu_hotplug_begin() to after "out_cancel:".

The BUG can be triggered by:

   echo 0 > /sys/devices/system/cpu/cpu1/online 


-Frank


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

* Re: 3.0.23-rt39 BUG: scheduling while atomic, _cpu_down()
  2012-03-10  1:51 3.0.23-rt39 BUG: scheduling while atomic, _cpu_down() Frank Rowand
@ 2012-03-10  2:03 ` Steven Rostedt
  2012-03-10  2:12   ` Frank Rowand
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2012-03-10  2:03 UTC (permalink / raw)
  To: frank.rowand; +Cc: tglx, linux-kernel, linux-rt-users

On Fri, 2012-03-09 at 17:51 -0800, Frank Rowand wrote:
> Hi Thomas,
> (and Steve, since you've been mucking about in the hotplug code,)
> 
> Yet another bit of fallout related to hotplug.
> 
> This appears to affect 3.0-rt1, 3.0.23-rt29, and 3.2.9-rt17.
> (Thus probably all 3.x versions, but I haven't been masochistic
> enough to check.)
> 
> If not defined CONFIG_PREEMPT_RT_FULL then

So you're saying that there's a bug with PREEMPT_RT off?

> 
>   - hotplug_lock() is a mutex_lock()
>   - cpu_hotplug_begin() calls hotplug_lock()
>   - _cpu_down() calls cpu_hotplug_begin() with preemption
>     disabled (disabled by the migrate_disable())
> 
> The call to cpu_hotplug_begin() is not in a preempt disabled
> region until hotplug-use-migrate-disable.patch.  This patch
> moves the preempt_enable() (aka migrate_enable()) from just
> before calling cpu_hotplug_begin() to after "out_cancel:".
> 
> The BUG can be triggered by:
> 
>    echo 0 > /sys/devices/system/cpu/cpu1/online 

Note, there's a lot more wrong with hotplug in rt than this. The hotplug
code really needs a total rewrite for RT to work with it. It probably
should have a total rewrite in mainline anyway.

-- Steve



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

* Re: 3.0.23-rt39 BUG: scheduling while atomic, _cpu_down()
  2012-03-10  2:03 ` Steven Rostedt
@ 2012-03-10  2:12   ` Frank Rowand
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Rowand @ 2012-03-10  2:12 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Rowand, Frank, tglx@linutronix.de, linux-kernel@vger.kernel.org,
	linux-rt-users@vger.kernel.org

On 03/09/12 18:03, Steven Rostedt wrote:
> On Fri, 2012-03-09 at 17:51 -0800, Frank Rowand wrote:
>> Hi Thomas,
>> (and Steve, since you've been mucking about in the hotplug code,)
>>
>> Yet another bit of fallout related to hotplug.
>>
>> This appears to affect 3.0-rt1, 3.0.23-rt29, and 3.2.9-rt17.
>> (Thus probably all 3.x versions, but I haven't been masochistic
>> enough to check.)
>>
>> If not defined CONFIG_PREEMPT_RT_FULL then
> 
> So you're saying that there's a bug with PREEMPT_RT off?

Yes, that is the problem.  But it is due to the RT patches,
not present in mainline.


>>   - hotplug_lock() is a mutex_lock()
>>   - cpu_hotplug_begin() calls hotplug_lock()
>>   - _cpu_down() calls cpu_hotplug_begin() with preemption
>>     disabled (disabled by the migrate_disable())
>>
>> The call to cpu_hotplug_begin() is not in a preempt disabled
>> region until hotplug-use-migrate-disable.patch.  This patch
>> moves the preempt_enable() (aka migrate_enable()) from just
>> before calling cpu_hotplug_begin() to after "out_cancel:".
>>
>> The BUG can be triggered by:
>>
>>    echo 0 > /sys/devices/system/cpu/cpu1/online 
> 
> Note, there's a lot more wrong with hotplug in rt than this. The hotplug
> code really needs a total rewrite for RT to work with it. It probably
> should have a total rewrite in mainline anyway.

Yep, I've been watching all the hotplug related conversations with interest...

-Frank


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

end of thread, other threads:[~2012-03-10  2:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-10  1:51 3.0.23-rt39 BUG: scheduling while atomic, _cpu_down() Frank Rowand
2012-03-10  2:03 ` Steven Rostedt
2012-03-10  2:12   ` Frank Rowand

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