From: Kyle McMartin <kyle@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: rusty@rustcorp.com.au
Subject: [PATCH] [RFC] remove (more or less) unnecessary cacheline_aligned from module_ref
Date: Sun, 11 Jan 2009 22:18:41 -0500 [thread overview]
Message-ID: <20090112031841.GC21090@bombadil.infradead.org> (raw)
On x86_64 systems with CONFIG_MAXSMP set, NR_CPUS is exploded to 4096
cpus. This cacheline_aligned attribute on the local_t in module_ref
results in struct module bloating to over 512KB in size on x86_64, which
tends to, er, add up. This results in insane disk usage on distro
kernel configs (1GB+ on Fedora.)
Killing cacheline_aligned reduces the size of struct module to somewhat
more sane levels.
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
I'll followup with a patch to make mod->ref dynamically allocated, but
that needs a bit more thinking because module_unload_init currently
doesn't have a failure path.
Of course, reducing NR_CPUS to something sane was an easy way to patch
over the problem.
diff --git a/include/linux/module.h b/include/linux/module.h
index 4f7ea12..32b0bda 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -222,7 +222,7 @@ void *__symbol_get_gpl(const char *symbol);
struct module_ref
{
local_t count;
-} ____cacheline_aligned;
+};
enum module_state
{
next reply other threads:[~2009-01-12 3:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 3:18 Kyle McMartin [this message]
2009-01-12 11:08 ` 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=20090112031841.GC21090@bombadil.infradead.org \
--to=kyle@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®