Re: Size of kernel modules
From: Sergey Vlasov
Date: Sun Jun 10 2007 - 09:42:20 EST
On Sat, 9 Jun 2007 15:59:55 +0200 (CEST) Jan Engelhardt wrote:
> On Jun 9 2007 08:08, Jon Masters wrote:
> >
> >So I missed half of this conversation - you're saying that on a
> >CONFIG_DEBUG_KERNEL, you have such large .ko module files that depmod
> >segfaults? Can I get a core dump or any further information? :-)
>
> Just make sure your /lib/modules/<kernel> is like 300 megabytes or
> even more. Then depmod will clog up quite a lot memory already.
> (Taking a 256 mb ram machine for example, no swap or just very
> little.)
I have noticed such problems before - the depmod code just loads whole
module files into memory. The situation is especially bad when
module-init-tools is configured with --enable-zlib - in this case memory
for all module files is allocated with malloc(). (Without --enable-zlib
depmod just mmaps all module files, which at least does not eat swap,
and probably does not bring unused pages into memory.)
I have made some patches to module-init-tools - unfortunately, they
probably don't apply to the current version (they were based on
v3.3-pre4):
git://git.altlinux.org/people/vsu/packages/module-init-tools.git
(release-module-data branch)
http://git.altlinux.org/people/vsu/packages/?p=module-init-tools.git;a=shortlog;h=release-module-data
Attachment:
pgp00000.pgp
Description: PGP signature