From: Eric Dumazet <dada1@cosmosbay.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Andreas Gruenbacher <agruen@suse.de>,
Jan Blunck <jblunck@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Mike Travis <travis@sgi.com>
Subject: Re: [PATCH] Allocate module.ref array dynamically
Date: Tue, 11 Nov 2008 23:06:26 +0100 [thread overview]
Message-ID: <491A01E2.2010701@cosmosbay.com> (raw)
In-Reply-To: <s5htzaekp6o.wl%tiwai@suse.de>
Takashi Iwai a écrit :
> Hi,
>
> we found that the kernel module sizes and memory footprints
> grow drastically when NR_CPUS is high. For example, with
> NR_CPUS=4096, SUSE kernel packages weigh over 500MB (even w/o debug
> info).
>
> A part of the reason is the fixed size array in struct module.
> The patch below fixes the problem by allocating it dynamically.
> With the patch, the size can go down to 20MB.
>
>
> Any comments/suggestions appreciated.
>
Many attempts were done on this area on the past.
Your patch has the drawback of using kcalloc(), while previously, module_ref
space was allocated with vmalloc().
After a while, a machine could have a lot of vmalloc() space available, but not enough
physically contiguous space to fullfill a kmalloc(large_area) call.
So a module load could fail, while previous code could load module.
I believe Mike Travis has a better patch for this problem, partly using new percpu allocator.
next prev parent reply other threads:[~2008-11-11 22:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 20:01 [PATCH] Allocate module.ref array dynamically Takashi Iwai
2008-11-11 22:06 ` Eric Dumazet [this message]
2008-11-11 22:15 ` Eric Dumazet
2008-11-11 22:32 ` Takashi Iwai
2008-11-11 22:26 ` Takashi Iwai
2008-11-12 1:44 ` Rusty Russell
2008-11-12 2:26 ` Mike Travis
2008-11-12 3:17 ` Christoph Lameter
2008-11-12 13:46 ` Mike Travis
2008-11-12 3:14 ` Christoph Lameter
2008-11-12 9:59 ` Rusty Russell
2008-11-12 20:11 ` Christoph Lameter
2008-11-12 22:01 ` Rusty Russell
2008-11-12 22:50 ` Christoph Lameter
2008-11-13 9:21 ` Rusty Russell
2008-11-13 14:40 ` Christoph Lameter
2008-11-13 23:49 ` Rusty Russell
2008-11-14 0:20 ` Christoph Lameter
2008-11-16 0:00 ` Rusty Russell
2008-11-16 21:41 ` Rusty Russell
2008-11-20 16:47 ` Christoph Lameter
2008-11-20 23:21 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=491A01E2.2010701@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=agruen@suse.de \
--cc=akpm@linux-foundation.org \
--cc=jblunck@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tiwai@suse.de \
--cc=travis@sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox