> 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 :)