linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* lilo vs other OS bootloaders was: FreeBSD makes progress
@ 2001-08-31 21:49 Grover, Andrew
  2001-08-31 22:40 ` Andreas Dilger
  2001-08-31 22:50 ` Alan Cox
  0 siblings, 2 replies; 18+ messages in thread
From: Grover, Andrew @ 2001-08-31 21:49 UTC (permalink / raw)
  To: 'Russell Coker', Acpi-linux (E-mail)
  Cc: 'linux-kernel@vger.kernel.org'

OK, sounds like enhancing LILO to load modules beyond the kernel is
unworkable.

Just for discussion's sake, I would like to point out that other OSs do have
loaders that can load boot drivers, and they can use this to increase the
modularity of their kernel. FreeBSD's and Win2k's bootloaders are examples.
Win2K even abstracts all SMP/UP code into a module (the HAL) and loads this
at boot, thus using the same kernel for both.

So of course I realize this wouldn't happen any time soon, but has any
discussion taken place regarding enhancing the bootloader (grub? Steal
FreeBSD's?) to load modular drivers very early, and possibly abstracting
SMP/UP from the kernel proper? Wouldn't this be a better solution than
initrd?

Just curious -- Andy


> From: Russell Coker [mailto:russell@coker.com.au]
> > It would be really cool if lilo or grub could pull this 
> trick, too. Without
> > it, we're left with compiling ACPI into the kernel, or 
> doing some initrd
> > trick, both of which have disadvantages.
> 
> LILO is architecturally incapable of doing such things 
> without a huge degree 
> of hacking.  LILO has no support for .b files that set state. 
>  Having a .b 
> file that loads one of two other files depending on what it 
> detects would be 
> possible (but a gross hack).
> 
> Then if LILO determined that ACPI hardware was present how 
> would it tell the 
> kernel to load a module?
> 
> Having a statically linked program on an initrd which will 
> run "modprobe 
> acpi" if it detects appropriate hardware is very easy to do 
> for an install or 
> rescue disk.
> 
> For a running system the scripts that make the initrd image 
> can check for the 
> presence of ACPI to determine whether the ACPI module belongs 
> in the initrd.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: lilo vs other OS bootloaders was: FreeBSD makes progress
@ 2001-09-01 14:55 Samium Gromoff
  2001-09-01 12:03 ` Peter Wächtler
  2001-09-01 14:10 ` Rik van Riel
  0 siblings, 2 replies; 18+ messages in thread
From: Samium Gromoff @ 2001-09-01 14:55 UTC (permalink / raw)
  To: linux-kernel

 ANdreas Dilger wrote: 
> Win2K even abstracts all SMP/UP code into a module (the HAL) and loads this
> at boot, thus using the same kernel for both.
    the only possibility of this shows how ugly is SMP in win2k...
   this is a situation where they are or geniuses or idiots.
   MS never proved to be geniuses so they still are idiots...

cheers,
 Sam

^ permalink raw reply	[flat|nested] 18+ messages in thread
* RE: lilo vs other OS bootloaders was: FreeBSD makes progress
@ 2001-09-04 21:52 Grover, Andrew
  2001-09-05  1:51 ` David S. Miller
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Grover, Andrew @ 2001-09-04 21:52 UTC (permalink / raw)
  To: 'Rik van Riel'
  Cc: 'linux-kernel@vger.kernel.org', 'Samium Gromoff'

> >  ANdreas Dilger wrote:
> > > Win2K even abstracts all SMP/UP code into a module (the 
> HAL) and loads this
> > > at boot, thus using the same kernel for both.
> 
> >     the only possibility of this shows how ugly is SMP in win2k...
> 
> Not necessarily. More likely the difference between SMP and
> UP is marketing-only and both have the overhead of SMP
> locking, etc..

No, they don't do this by running an SMP kernel on UP, they do it by
abstracting functions that care about SMP into another module.

Here's Linux:

Drivers (SMP agnostic)
Kernel (SMP/UP specific)

Here's Windows:

Drivers (SMP agnostic)
Kernel (SMP agnostic)
HAL (SMP/UP specific, contains locking primitive funcs etc.)

So they use the same kernel and just switch out the HAL.

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?

For one thing, it would get rid of the hundreds of "#ifdef CONFIG_SMP"s in
the kernel. ;-)

Regards -- Andy

^ permalink raw reply	[flat|nested] 18+ messages in thread
* RE: lilo vs other OS bootloaders was: FreeBSD makes progress
@ 2001-09-05 21:18 Grover, Andrew
  2001-09-05 22:11 ` Alan Cox
  2001-09-05 22:13 ` Tim Hockin
  0 siblings, 2 replies; 18+ messages in thread
From: Grover, Andrew @ 2001-09-05 21:18 UTC (permalink / raw)
  To: linux-kernel

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2001-09-12 21:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-31 21:49 lilo vs other OS bootloaders was: FreeBSD makes progress Grover, Andrew
2001-08-31 22:40 ` Andreas Dilger
2001-08-31 22:50 ` Alan Cox
2001-09-01 15:50   ` Jamie Lokier
2001-09-08 17:55   ` Eric W. Biederman
2001-09-08 18:55     ` H. Peter Anvin
2001-09-01 14:55 Samium Gromoff
2001-09-01 12:03 ` Peter Wächtler
2001-09-01 12:39   ` Alan Cox
2001-09-01 14:10 ` Rik van Riel
2001-09-04 21:52 Grover, Andrew
2001-09-05  1:51 ` David S. Miller
2001-09-05  8:03 ` Helge Hafting
2001-09-05 14:26 ` Horst von Brand
2001-09-11 22:48 ` Pavel Machek
2001-09-05 21:18 Grover, Andrew
2001-09-05 22:11 ` Alan Cox
2001-09-05 22:13 ` Tim Hockin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).