[lkml]   [2001]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: lilo vs other OS bootloaders was: FreeBSD makes progress
> From: Helge Hafting []
> > I'm not advocating anything similar for Linux, I'm just
> saying it's an
> > interesting thought experiment - what if the SMP-ness of a
> machine was
> > abstracted from the kernel proper? How much of the kernel
> really cares, or
> > really *should* care about SMP/UP?
> You would also get rid of performance. The agnostic kernel would be
> slower than simply running the SMP kernel on UP.
> Here's why:
> You can easily make an "agnostic kernel & modules" by changing the
> spinlocks to function calls. Then you'll provide a null stub
> call site
> for running UP, and the real spinlock code for running SMP.
> Unfortunately, this gives the overhead of a function call,
> both for SMP
> and for UP. This overhead is usually _bigger_ than the overhead of a
> inlined spinlock.

Obviously moving the spinlock behind a function call would be slower.
However, I'm not sure whether this would really hurt overall kernel
performance, for two reasons: First, I would think that the requirement to
use the lock instruction would overshadow any function call overhead.
Second, I would guess that minimization of the time the kernel spins on held
locks is much more important than whether acquiring an unheld lock takes 4
instructions or 8.

Anyways, if I ever go back for my masters degree I think modularizing SMP/UP
(and looking at the performance impact) would be an interesting thesis
project ;-)

Regards -- Andy
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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