All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: poc: link modules into one .ko
Date: Tue, 09 Sep 2008 07:19:32 +0200	[thread overview]
Message-ID: <48C60764.9040400@trash.net> (raw)
In-Reply-To: <alpine.LNX.1.10.0809061436440.22690@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
> I went over the suggestion of collapsing module files again [1]. For 
> fun and research, instead of combining specific modules, I have set out 
> to combine everything into a single module.
> 
> [1] http://marc.info/?l=netfilter-devel&m=121148631320895&w=2
> 
> All .ko modules together clock in at 1037772 bytes of diskspace, and 
> they are likely to use just as much kernel memory when loaded (strip a 
> few ELF stuff, and then round up to the next PAGE_SIZE again).
> 
> After the patch, the stats are much different:
> -rw-r--r-- 1 jengelh 160910 2008-09-06 18:15 xtables_ext.ko
> -rw-r--r-- 1 jengelh  57967 2008-09-06 18:15 xtables_xct.ko
> -rw-r--r-- 1 jengelh  27295 2008-09-06 18:15 xtables_xnat.ko
> -rw-r--r-- 1 jengelh  47550 2008-09-06 18:15 xtables_xv6.ko
> 
> 293722 bytes, that is approximately a 70% reduction in disk and memory 
> usage. (There are three modules not in this POC xtables_*.ko.) However, 
> as a result, currently *all* extensions are loaded, which might incur 
> extra memory being used.
> 
> The proof-of-concept patch is not too pretty, but it extrapolates one 
> way to deal with the module flood (which has been inflating compile 
> times and whatnot), and it does so without moving tons of code around. I 
> think the only way to shove off more bytes is to revamp the API a bit 
> and even try to reduce the amount of .o files during build.

Its really not pretty :) While I agree that this does make sense
for the commonly used modules and distribution kernels, I don't
think it belongs here. A kbuild option to combine related modules
would be preferrable in my opinion.

      reply	other threads:[~2008-09-09  5:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 22:29 poc: link modules into one .ko Jan Engelhardt
2008-09-09  5:19 ` Patrick McHardy [this message]

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=48C60764.9040400@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.