Messages in this thread Patch in this message | | | Date | Mon, 6 Dec 1999 19:40:44 +0100 (CET) | From | Ingo Molnar <> | Subject | [patch] Re: setitimer lowlatency-2.2.13-A1 questions |
| |
On Mon, 6 Dec 1999, William Montgomery wrote:
> The following ktrace shows the behavior I describe:
oh, ok, i now know what the problem is:
> 120795.36 6.18 timer_interrupt pid(6801)
(bh gets marked, ok.)
> 120801.55 0.59 do_timer pid(6801) > 120802.14 0.94 enable_8259A_irq pid(6801) > 120803.08 0.14 do_IRQ pid(6801) > 120803.22 0.16 do_bottom_half pid(6801) > ^^^---- seems like timer_bh should run right after this
(but the networking code has disabled TIMER_BH so it doesnt get run!)
> 120803.38 2.53 do_IRQ pid(6801) > 120805.91 2.31 kmem_cache_free pid(6801) > 120808.22 0.87 del_timer pid(6801)
> 120811.79 2079.30 do_IRQ pid(6801) > ^^^-- I think pid(6801) is running now *prior* to timer_bh
(networking code enables TIMER_BH, but it doesnt run it!)
> 122891.09 0.53 system_call pid(6801) > 122891.62 0.81 sys_sigsuspend pid(6801) > 122892.44 0.59 schedule pid(6801) > 122893.03 0.30 do_bottom_half pid(6801) > 122893.33 0.89 timer_bh pid(6801)
the next 'return to user-mode' (or interrupt) naturally runs the BH, but belatedly.
the solution is to call do_bottom_half() in enable_bh():
if (active & mask) do_bottom_half();
(see the attached patch - i have not even compiled it so beware.)
does this help?
-- mingo
--- linux/include/asm-i386/softirq.h.orig Mon Dec 6 19:27:28 1999 +++ linux/include/asm-i386/softirq.h Mon Dec 6 19:27:58 1999 @@ -136,6 +136,8 @@ if (atomic_dec_and_test(&bh_mask_count[nr])) bh_mask |= 1 << nr; spin_unlock_irqrestore(&i386_bh_lock, flags); + if (bh_mask & bh_active) + do_bottom_half(); } #endif /* __ASM_SOFTIRQ_H */
- 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/
| |