* Re: Fw: [Bug 4559] New: cfq scheduler lockup: NMI oops while runningltp - 20050207 on 2.6.12-rc2-mm3 with kdump enabled
[not found] <20050429000038.1da6f2e1.akpm@osdl.org>
@ 2005-04-30 12:42 ` Oleg Nesterov
2005-04-30 17:09 ` Oleg Nesterov
0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2005-04-30 12:42 UTC (permalink / raw)
To: Andrew Morton
Cc: Jens Axboe, linux-kernel, Maneesh Soni, Benjamin Herrenschmidt,
Juergen Kreileder
Andrew Morton wrote:
>
> http://bugme.osdl.org/show_bug.cgi?id=4559
>
> Timer bug, I guess.
Yes, the new timer code is racy. Example:
spinlock_t LOCK;
void void timer_func()
{
spin_lock(&LOCK);
}
timer_list TIMER = TIMER_INITIALIZER(timer_func);
-------------------------------------------------------------------
CPU_0 CPU_1
add_timer(&TIMER);
spin_lock(&LOCK);
__run_timers:
sets ->running_timer = &TIMER;
calls timer_func()
waits for &LOCK
__mod_timer(&TIMER);
/* Ensure the timer is serialized. */
retries while ->running_timer == &TIMER
Many thanks to Maneesh Soni for his excellent analysis in
http://bugme.osdl.org/show_bug.cgi?id=4559.
Note that del_timer_sync has this problem too, but this
situation is forbidden by synchronization rules.
At the moment I don't have a proper solution.
One option is to change __mod_timer() so that it would not
switch ->base when the timer is already running. But this
would be behavioural change: currently __mod_timer() guarantees
that the timer would be armed on the local cpu.
I'll try to find a solution, but perhaps it's better to drop
this patch for now.
Oleg.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fw: [Bug 4559] New: cfq scheduler lockup: NMI oops while runningltp - 20050207 on 2.6.12-rc2-mm3 with kdump enabled
2005-04-30 12:42 ` Fw: [Bug 4559] New: cfq scheduler lockup: NMI oops while runningltp - 20050207 on 2.6.12-rc2-mm3 with kdump enabled Oleg Nesterov
@ 2005-04-30 17:09 ` Oleg Nesterov
2005-04-30 20:10 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2005-04-30 17:09 UTC (permalink / raw)
To: Andrew Morton, Jens Axboe, linux-kernel, Maneesh Soni,
Benjamin Herrenschmidt, Juergen Kreileder
Oleg Nesterov wrote:
>
> One option is to change __mod_timer() so that it would not
> switch ->base when the timer is already running. But this
> would be behavioural change: currently __mod_timer() guarantees
> that the timer would be armed on the local cpu.
Is it acceptable? If yes, I'll send the patch tomorrow.
I don't see another solution.
Oleg.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fw: [Bug 4559] New: cfq scheduler lockup: NMI oops while runningltp - 20050207 on 2.6.12-rc2-mm3 with kdump enabled
2005-04-30 17:09 ` Oleg Nesterov
@ 2005-04-30 20:10 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2005-04-30 20:10 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: axboe, linux-kernel, maneesh, benh, jk
Oleg Nesterov <oleg@tv-sign.ru> wrote:
>
> Oleg Nesterov wrote:
> >
> > One option is to change __mod_timer() so that it would not
> > switch ->base when the timer is already running. But this
> > would be behavioural change: currently __mod_timer() guarantees
> > that the timer would be armed on the local cpu.
>
> Is it acceptable? If yes, I'll send the patch tomorrow.
>
> I don't see another solution.
I don't see how it could cause any harm.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-30 20:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20050429000038.1da6f2e1.akpm@osdl.org>
2005-04-30 12:42 ` Fw: [Bug 4559] New: cfq scheduler lockup: NMI oops while runningltp - 20050207 on 2.6.12-rc2-mm3 with kdump enabled Oleg Nesterov
2005-04-30 17:09 ` Oleg Nesterov
2005-04-30 20:10 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).