lkml.org 
[lkml]   [2006]   [Mar]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 12 Mar 2006 14:26:22 +0100 (CET)
FromRoman Zippel <>
SubjectRe: [patch 5/8] hrtimer remove state field
Hi,

On Sun, 12 Mar 2006, Thomas Gleixner wrote:

> > BTW the active check can be removed again, as it was added for a state 
> > machine problem, I only didn't want to remove it for 2.6.16.
> 
> The check can not be removed. The reason why it was added is still the
> same. 
> 
> It has nothing to do with a state machine. It's a simple SMP locking
> issue.
> 
> softirq runs on CPU0
> base->lock()
> 
> remove_timer(timer);
> 
> base->unlock()
> 			signal of previous expiry is delivered on CPU1
> 			timer is reqeued.
> requeue = timer->fn();
> 
> base->lock()
> 
> if (requeue)
> 	enqueue_timer(timer)
> 
> --> OOPS
> 
> We can not wait in the signal delivery path until the callback has been
> executed, as we hold the posix-timer->lock and this would deadlock
> timer->fn().

posix_timer either restarts the timer directly or via signal delivery, but 
never both, so this case can't happen (unless there is a bug in the 
posix_timer).

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-12 13:29    [from the cache]
©2003-2008