lkml.org 
[lkml]   [1997]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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 :)


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.071 / U:27.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site