linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	davem@davemloft.net, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Value of __*{init,exit} anotations?
Date: Thu, 31 Jan 2008 00:32:19 +0200	[thread overview]
Message-ID: <20080130223219.GT29368@does.not.exist> (raw)
In-Reply-To: <1201729295.3292.94.camel@localhost.localdomain>

On Wed, Jan 30, 2008 at 03:41:35PM -0600, James Bottomley wrote:
> On Wed, 2008-01-30 at 22:20 +0100, Sam Ravnborg wrote:
> > On Wed, Jan 30, 2008 at 03:00:16PM -0600, James Bottomley wrote:
>...
> > > __init is possibly justifiable with a few hundred k savings on boot.
> > > __devinit and the rest are surely killable on the grounds they provide
> > > little benefit for all the pain they cause.
> > For the embedded people a few kb here and there is worth it.
> > 
> > > all __exit seems to do is set us up for unreferenced pointers in
> > > discarded sections, so could we kill that too?
> > Again - savings when we build-in the drivers.
> > And without the checks we see 'funny' linker errors on the architectues
> > that can continue to add the .exit.text in /DISCARD/
> 
> Perhaps you have different figures, but my standard kernel linking ones
> tell me that the discard sections only save tens of k (not hundreds that
> the init ones save), so I really do think they have no real benefit and
> land us huge problems of pointer references into discarded sections.
> 
> I don't deny we can invest large amounts of work to fix our current
> issues and build large scriptable checks to ensure we keep it fixed ...
> I'm just asking if, at the end of the day, it's really worth it.

Some people consider it worth it for their memory restricted systems
and would like to drive the annotations even further. [1]

My experience while fixing section bugs during the last years is that 
the __dev{init,exit}* are actually the main question since they are both 
the majority of annotations and the ones that bring benefits only 
in a case that has become very exotic (CONFIG_HOTPLUG=n).

All the other annotations either both bring value for everyone
(plain __init* and __exit*) or are nothing normal drivers would
use (__cpu* and _mem*).

People at linux-arch (Cc'ed) might be better at explaining how often 
CONFIG_HOTPLUG gets used in real-life systems and how big the savings 
are there.

That might be a good basis for deciding whether it's worth it.

> James

cu
Adrian

[1] http://lkml.org/lkml/2007/10/12/297

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


       reply	other threads:[~2008-01-30 22:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080130200336.GN29368@does.not.exist>
     [not found] ` <1201726817.3292.84.camel@localhost.localdomain>
     [not found]   ` <20080130212011.GA26621@uranus.ravnborg.org>
     [not found]     ` <1201729295.3292.94.camel@localhost.localdomain>
2008-01-30 22:32       ` Adrian Bunk [this message]
2008-01-30 22:44         ` Value of __*{init,exit} anotations? James Bottomley
2008-01-30 22:50           ` Russell King
2008-01-31  5:42         ` Andi Kleen
2008-01-31  7:44         ` Sam Ravnborg
2008-01-31 15:57           ` [PATCH] kill hotplug init/exit section annotations James Bottomley
2008-01-31 16:11             ` Arjan van de Ven
2008-01-31 16:21               ` Adrian Bunk
2008-01-31 17:07                 ` Arjan van de Ven
2008-01-31 17:14                   ` Adrian Bunk
2008-01-31 17:45                     ` Chris Wedgwood
2008-01-31 17:55                       ` Adrian Bunk
2008-01-31 18:32                         ` Chris Wedgwood
2008-01-31 18:52                           ` Geert Uytterhoeven
2008-01-31 17:48                     ` Arjan van de Ven
2008-01-31 18:34                       ` Sam Ravnborg
2008-01-31 18:48                         ` Arjan van de Ven
2008-01-31 19:41                           ` 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=20080130223219.GT29368@does.not.exist \
    --to=bunk@kernel.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=davem@davemloft.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=sam@ravnborg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).