lkml.org 
[lkml]   [1999]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: timer_bh behaviour incorrect for 2.2.13?
On Thu, 9 Dec 1999, Ingo Molnar wrote:

>
>On Thu, 9 Dec 1999, Andrea Arcangeli wrote:
>
>> CPU0 CPU1
>> ------------- -------------------
>> hardirq_endlock()
>> do_IRQ
>> timer_interrupt()
>> mark_bh(TIMER_BH)
>> do_bottom_half
>> global_bh_count still 1 (other CPU)
>> so skip bh processing.
>> iret (return to userspace)
>> softirq_endlock (too late!)
>
>this is impossible if we do hardirq_endlock()+softirq_endlock() with local
>IRQs disabled [like my second quick-patch did] ... No need to add

As you said: you have _local_ irq disabled, so any irq is free to run
parallel on the other CPU.

You have _not_ global irq disabled cli() (you don't want to use cli()).

I'll try again with irq disabled:

CPU0 CPU1
------------- -------------------
__cli();
hardirq_endlock()
do_IRQ
timer_interrupt()
mark_bh(TIMER_BH)
do_bottom_half
global_bh_count still 1 (other CPU)
so skip bh processing.
iret (return to userspace)
softirq_endlock (too late!)
Andrea


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

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2011 Jasper Spaans