Adam J. Richter wrote:
> >The total saving over all 2.5.24 modules is 4% of the total module
> >sizes, rounded to page boundaries.
>
> As individual space optimizations go, 4% is respectable,
> especially for something that has no cost, helps detect bugs and
> simplifies the kernel. It is hard to think of many potential
> other space improvements that would as effective, especially as
> function of implementation effort. In comparison, my vmlinux is
> 5% init sections. So, if init sections are worth it for the
> core kernel, they should be worth it for modules.
Ehmmm. You normally load one big 1Mb kernel, freeing about 40 or 50k
at init time.
You normally load a couple of modules, totalling much less.
Hmm. Just checked on a system with sound as modules, I see half a
megabyte of modules. So maybe that 20k is worth it. On the other hand,
you only load half a megabyte of shit if you have the RAM to spare.
20k is not worth the time I spend typing this....
> >Most of that saving comes from a few modules.
>
> This makes me wonder if __init procedures are not being
> aggressively identified. I wonder if people would use __init a little
> more if they knew they would get the benefit of it in the module case.
> Perhaps someday someone will write a tool to identify procedures that
> are only called from init sections.
Sometimes the "error path" will try to reset/reinit the chip. You will
not see that happening during a normal usage cycle, but you will get
bitten if you remove the init based on an actual call-trace....
> Kernel modules have been a way of life for me for years, and I
> don't think I've ever caught a kernel bug by the mechanism that you
This happens often enough "during development" that the bugs get fixed
before you get to see them....
> describe. However, I see no harm in having a debugging option that
> always vmalloc'ed kernel modules. This faciilty could be entirely
> configuarable from user level by having insmod allocate a module of
> *exactly* one page for modules that were less than a page (since you
> would only want to kmalloc modules that were *less* than one page).
As far as I know, kmallocing more than half a page will actually
allocate the whole page.
Roger.
-- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* * There are old pilots, and there are bold pilots. * There are also old, bald pilots. - 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 : Sun Jul 07 2002 - 22:00:10 EST