All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	Matt Mackall <mpm@selenic.com>
Subject: Re: [pull request] getting rid of __cpuinit
Date: Sat, 25 Oct 2008 09:59:25 +0200	[thread overview]
Message-ID: <20081025075925.GA22805@uranus.ravnborg.org> (raw)
In-Reply-To: <20081024142056.6a2d082a@infradead.org>

On Fri, Oct 24, 2008 at 02:20:56PM -0700, Arjan van de Ven wrote:
> Hi Linus,
> 
> this is one of those pull requests for which the best timing is likely at the 
> end of the merge window due to touching a large number of files in a trivial way.
> In fact, 6 of the 8 patches were done via regexps:
> 
> find -name "*.c" | xargs sed -i "s/^__cpuinit //g"
> find arch/ -name "*.h" | xargs sed -i "s/ __cpuinit//g"
> find -name "*.c" | xargs sed -i "s/ __cpuinit$//g"
> find -name "*.c" | xargs sed -i "s/ __cpuinitdata//g"
> find -name "*.c" | xargs sed -i "s/ __cpuexit / /g"
> find -name "*.c" | xargs sed -i "s/ __cpuinit / /g"
> 
> (I suppose asking for a "git sed" is too much to do...)
> 
> The point of this series is to get rid of __cpuinit. (I'll be working on other __XXXXinit after this)
> __cpuinit is a NOOP for CONFIG_HOTPLUG_CPU, which on for just about anybody in practice 
> (in fact I had to disable 6 common options to even be ABLE to turn it off for size testing) 
> and all distros also ship with it enabled.
> 
> Yet it's a rather error prone construct since the rules of this sort of __XXXXinit thing are
> rather complex and convoluted.. better to just get rid of it entirely.
> 
> As for the code size effect, after I spent a bunch of time cursing and trying to find out
> how to disable HOTPLUG_CPU, I managed to get an x86-64 build that actually shows how much space 
> we ACTUALLY save with all the __cpuinit's in the tree... it's less than 2Kb. That is, if you manage
> to turn it actually off.
> 
>    text	   data	    bss	    dec	    hex	filename
> 4618096	1358684	 848588	6825368	 682598	vmlinux.before
> 4619965	1356908	 848716	6825589  682675	vmlinux.after

The interesting number here is the size of the cpuinit/cpuexit sections.
cpuinit sections are discarded after init and cpuexit sections are discarded
if you do not use modules.

Can you share these numbers with us?

	Sam

  parent reply	other threads:[~2008-10-25  7:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24 21:20 [pull request] getting rid of __cpuinit Arjan van de Ven
2008-10-24 21:37 ` [PATCH] kbuild: drop cpuinit/cpuexit checks in modpost Sam Ravnborg
2008-10-25 23:56   ` Arjan van de Ven
2008-10-25  7:59 ` Sam Ravnborg [this message]
2008-10-25 14:00   ` [pull request] getting rid of __cpuinit Arjan van de Ven
2008-10-25 14:35     ` Sam Ravnborg
2008-10-25 15:06       ` Arjan van de Ven
2008-10-25 16:21         ` Sam Ravnborg
2008-10-25 16:29           ` Arjan van de Ven
2008-10-25 18:20             ` Rafael J. Wysocki
2008-10-25 21:36               ` Sam Ravnborg

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=20081025075925.GA22805@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=torvalds@linux-foundation.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.