Messages in this thread |  | | Date | Sun, 26 Jan 1997 14:52:39 +0100 (MET) | From | Ingo Molnar <> | Subject | Re: Faster timers for Linux 2.1.22 |
| |
On Sun, 26 Jan 1997, Keith Owens wrote:
> The aim is to replace cli/sti with disable/enable_bh where possible.
my problem with disable_bh() is that it doesnt 'buffer' interrupts. cli/sti are a bit more expensive (a bit. 16 cycles for cli/sti, not that much on a pentium). But when an IRQ happens while being cli-ed, it will go off immediately after sti.
to achieve this we need something like this in enable_bh():
if (bh_active & bh_mask) handle_bottom_half();
which is already more costy i think than the cli/sti would have been ... not to talk about cli and sti being 1 byte instructions on intel, thus they really have a small cache footprint. IMHO, cli/sti is only an issue if it lasts too long ... unless i'm missing something.
how costy is cli/sti on other platforms?
-- mingo
ps. but with SMP, the cli/sti picture will change drastically :)
|  |