RE: lilo vs other OS bootloaders was: FreeBSD makes progress

From: Grover, Andrew (andrew.grover@intel.com)
Date: Wed Sep 05 2001 - 16:18:51 EST


> From: Helge Hafting [mailto:helgehaf@idb.hist.no]
> > 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 07 2001 - 21:00:32 EST