lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090112031841.GC21090@bombadil.infradead.org>
Date:	Sun, 11 Jan 2009 22:18:41 -0500
From:	Kyle McMartin <kyle@...radead.org>
To:	linux-kernel@...r.kernel.org
Cc:	rusty@...tcorp.com.au
Subject: [PATCH] [RFC] remove (more or less) unnecessary cacheline_aligned
	from module_ref

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@...hat.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
 {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ