John Styler via Plaxo | 1 Jun 2011 11:59

John Styler has invited you to join Plaxo


John invited you to join Plaxo! 

John Styler
Web & Graphic Specialist, Get more people to see your
business  <at>  www.BizOppers.biz

John uses Plaxo, a smart address book that keeps your address
book up-to-date and notifies your important contacts when you
change your information. Learn more.
http://www.plaxo.com/products?src=email&et=79&el=en_us

Join now for free
http://www.plaxo.com/join/taf?src=email&et=79&el=en_us&rem=OpYKXoiPVmSKhpDu3qDZbWOwZtigQgCiqtNQVihqlzM%3D&suid=WwCFRqYnbpMkAONcISCRzHWRMlgGub8lK2EZdQ09YYk%3D

Plaxo, Inc. - 203 Ravendale Drive - Mountain View - CA - 94043 -
USA 
Never Send Me Emails
http://www.plaxo.com/stop?src=email&et=79&el=en_us&email=freebsd-arch%40freebsd.org

_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

Adrian Chadd | 11 Jun 2011 11:21
Picon
Favicon

[RFC] shipping kernels with default modules?

Hi guys,

Has there been any further thought as of late about shipping kernels
with modules only by default, rather than monolithic kernels?

I tried this experiment a couple years ago and besides a little
trickery with ACPI module loading, it worked out fine.

Is there any reason we aren't doing this at the moment? Eg by having a
default loader modules list populated from the kernel config file?

Adrian
_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

Kostik Belousov | 11 Jun 2011 12:43
Picon

Re: [RFC] shipping kernels with default modules?

On Sat, Jun 11, 2011 at 05:21:20PM +0800, Adrian Chadd wrote:
> Hi guys,
> 
> Has there been any further thought as of late about shipping kernels
> with modules only by default, rather than monolithic kernels?
> 
> I tried this experiment a couple years ago and besides a little
> trickery with ACPI module loading, it worked out fine.
> 
> Is there any reason we aren't doing this at the moment? Eg by having a
> default loader modules list populated from the kernel config file?
I use highly modularized kernel on all machines, because it allows me
to use (almost) the same kernel config.

Will you provide a prototype change for your suggestion ?
Adrian Chadd | 11 Jun 2011 15:21
Picon
Favicon

Re: [RFC] shipping kernels with default modules?

On 11 June 2011 18:43, Kostik Belousov <kostikbel <at> gmail.com> wrote:

>> Is there any reason we aren't doing this at the moment? Eg by having a
>> default loader modules list populated from the kernel config file?
> I use highly modularized kernel on all machines, because it allows me
> to use (almost) the same kernel config.
>
> Will you provide a prototype change for your suggestion ?

Sure, but in a couple weeks, or when I decide next to avoid study and
need a break from if_ath hackery, whichever comes first.

Thanks,

Adrian
_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

Warner Losh | 11 Jun 2011 18:54

Re: [RFC] shipping kernels with default modules?


On Jun 11, 2011, at 7:21 AM, Adrian Chadd wrote:
> On 11 June 2011 18:43, Kostik Belousov <kostikbel <at> gmail.com> wrote:
>>> Is there any reason we aren't doing this at the moment? Eg by having a
>>> default loader modules list populated from the kernel config file?
>> I use highly modularized kernel on all machines, because it allows me
>> to use (almost) the same kernel config.
>> 
>> Will you provide a prototype change for your suggestion ?
> 
> Sure, but in a couple weeks, or when I decide next to avoid study and
> need a break from if_ath hackery, whichever comes first.

For 9, I'd suggest compiling MINIMAL config file that takes everything out of GENERIC that can be a module. 
This would be the install kernel.  We'd create a loader.conf that lists everything currently in GENERIC. 
This would give us most of the benefits and allow our users to edit loader.conf to include the minimal set.

For 10, I'd suggest that we'd standardize the driver data such that we can determine from the plug and play
strings what to load.  This should be done with devd, not the boot loader.  The boot loader would need to load
all device's necessary to get / mounted.

Robert suggested having an /etc/driverdb file.  Unless that file is automatically generated, it will be
stale all the time.

One last thing to note is that we'd only need to know which modules to load from the plug and play strings. 
There's a few instances in the tree where from the plug and play strings we'd need to load two different
modules (look at the re/rl attach routines for one instance of why).

Oh, the other last thing to consider is that the module system doesn't have any notion of drivers that are
attached (or even bound to device nodes unattached).  If we had some notion, it would be easier to
(Continue reading)

David Schultz | 11 Jun 2011 19:18
Picon
Favicon

Re: [RFC] shipping kernels with default modules?

On Sat, Jun 11, 2011, Adrian Chadd wrote:
> Hi guys,
> 
> Has there been any further thought as of late about shipping kernels
> with modules only by default, rather than monolithic kernels?
> 
> I tried this experiment a couple years ago and besides a little
> trickery with ACPI module loading, it worked out fine.
> 
> Is there any reason we aren't doing this at the moment? Eg by having a
> default loader modules list populated from the kernel config file?

I've been doing this for years, and it has come in quite handy.
For instance, when my if_msk gets wedged, the only way to fix it
short of rebooting seems to be reloading the driver.

One issue, however, is that the boot loader is horrendously slow
at loading modules.  (Either that or my BIOS has a braindead int 13h
handler.)  Most of these modules aren't actually needed until much
later in the boot process, so a mechanism to load non-essential
modules after the file systems are mounted might provide a good
solution.

OS X has an interesting solution, intended to preserve the
flexibility of dynamic modules, while minimizing boot time.
It provides a kextcache utility, which packages the kernel
and all of the needed modules into a single binary for better
locality on disk.  Unlike recompiling the kernel, running
kextcache is fast, and the system runs it automatically when
hardware or driver changes necessitate it.
(Continue reading)

Doug Barton | 11 Jun 2011 20:34
Picon
Favicon

Re: [RFC] shipping kernels with default modules?

On 6/11/2011 2:21 AM, Adrian Chadd wrote:
> Hi guys,
>
> Has there been any further thought as of late about shipping kernels
> with modules only by default, rather than monolithic kernels?
>
> I tried this experiment a couple years ago and besides a little
> trickery with ACPI module loading, it worked out fine.
>
> Is there any reason we aren't doing this at the moment? Eg by having a
> default loader modules list populated from the kernel config file?

Has anyone benchmarked monolithic vs. modular? I think that should be 
done before we move in this direction.

Doug

--

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/

_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

(Continue reading)

mdf | 11 Jun 2011 20:32
Picon
Favicon

Re: [RFC] shipping kernels with default modules?

On Sat, Jun 11, 2011 at 10:18 AM, David Schultz <das <at> freebsd.org> wrote:
> On Sat, Jun 11, 2011, Adrian Chadd wrote:
>> Hi guys,
>>
>> Has there been any further thought as of late about shipping kernels
>> with modules only by default, rather than monolithic kernels?
>>
>> I tried this experiment a couple years ago and besides a little
>> trickery with ACPI module loading, it worked out fine.
>>
>> Is there any reason we aren't doing this at the moment? Eg by having a
>> default loader modules list populated from the kernel config file?
>
> I've been doing this for years, and it has come in quite handy.
> For instance, when my if_msk gets wedged, the only way to fix it
> short of rebooting seems to be reloading the driver.
>
> One issue, however, is that the boot loader is horrendously slow
> at loading modules.  (Either that or my BIOS has a braindead int 13h
> handler.)  Most of these modules aren't actually needed until much
> later in the boot process, so a mechanism to load non-essential
> modules after the file systems are mounted might provide a good
> solution.

Indeed, at $WORK we're trying to get shutdown -> restart under 2
minutes.  Several seconds of this is moving things *into* the kernel
that need to be there (disk drivers), and everything else to a point
in init where modules can be loaded in parallel, using the faster disk
driver, rather than in serial with slow BIOS handlers.

(Continue reading)

Warner Losh | 11 Jun 2011 22:00

Re: [RFC] shipping kernels with default modules?


On Jun 11, 2011, at 12:34 PM, Doug Barton wrote:
> On 6/11/2011 2:21 AM, Adrian Chadd wrote:
>> Hi guys,
>> 
>> Has there been any further thought as of late about shipping kernels
>> with modules only by default, rather than monolithic kernels?
>> 
>> I tried this experiment a couple years ago and besides a little
>> trickery with ACPI module loading, it worked out fine.
>> 
>> Is there any reason we aren't doing this at the moment? Eg by having a
>> default loader modules list populated from the kernel config file?
> 
> Has anyone benchmarked monolithic vs. modular? I think that should be done before we move in this direction.

I haven't noticed a difference, but I haven't done any specific benchmarking.

Warner

_______________________________________________
freebsd-arch <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe <at> freebsd.org"

Kostik Belousov | 11 Jun 2011 22:17
Picon

Re: [RFC] shipping kernels with default modules?

On Sat, Jun 11, 2011 at 02:00:20PM -0600, Warner Losh wrote:
> 
> On Jun 11, 2011, at 12:34 PM, Doug Barton wrote:
> > On 6/11/2011 2:21 AM, Adrian Chadd wrote:
> >> Hi guys,
> >> 
> >> Has there been any further thought as of late about shipping kernels
> >> with modules only by default, rather than monolithic kernels?
> >> 
> >> I tried this experiment a couple years ago and besides a little
> >> trickery with ACPI module loading, it worked out fine.
> >> 
> >> Is there any reason we aren't doing this at the moment? Eg by having a
> >> default loader modules list populated from the kernel config file?
> > 
> > Has anyone benchmarked monolithic vs. modular? I think that should be done before we move in this direction.
> 
> I haven't noticed a difference, but I haven't done any specific benchmarking.

There might be some measurable difference on i386, where we use dso for
modules. As a consequence, the overhead of GOT/PLT indirection, and, more
important, stolen %ebx on the register-starved architecture, may make
a difference. I doubt that any difference can be measured on amd64.

Gmane