mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Fabian Frederick <fabf@skynet.be>, linux-kernel@vger.kernel.org
Subject: Re: [RFC 1/1] proc: constify seq_operations
Date: Mon, 30 Jun 2014 13:49:30 -0700	[thread overview]
Message-ID: <1404161370.2717.10.camel@joe-AO725> (raw)
In-Reply-To: <20140630133939.c24cd71919cd28c90992d6e1@linux-foundation.org>

On Mon, 2014-06-30 at 13:39 -0700, Andrew Morton wrote:
> On Mon, 30 Jun 2014 21:03:17 +0200 Fabian Frederick <fabf@skynet.be> wrote:
> 
> > proc_uid_seq_operations, proc_gid_seq_operations and proc_projid_seq_operations
> > are only called in proc_id_map_open with seq_open as
> > const struct seq_operations so we can constify the 3 structures and update
> > proc_id_map_open prototype.
> 
> There are an absolutely enormous number of places where we could
> constify things.

Which would be a good thing.

>   For sheer sanity's sake I'm not inclined to churn the
> code in this way unless a patch provides some sort of runtime benefit. 
> And this particular patch doesn't appear to change the generated code
> at all.

It moves ~100 bytes from data to text
(gcc 4.8)

$ size kernel/user_namespace.o*
   text	   data	    bss	    dec	    hex	filename
   6676	   3107	   2248	  12031	   2eff	kernel/user_namespace.o.new
   6580	   3211	   2248	  12039	   2f07	kernel/user_namespace.o.old



  reply	other threads:[~2014-06-30 20:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 19:03 Fabian Frederick
2014-06-30 20:39 ` Andrew Morton
2014-06-30 20:49   ` Joe Perches [this message]
2014-06-30 20:57     ` Andrew Morton
2014-06-30 21:09       ` Joe Perches
2014-06-30 21:17         ` Andrew Morton
2014-07-01  8:17   ` Christoph Hellwig
2014-07-01  8:41     ` Richard Weinberger
2014-07-01 12:47       ` Joe Perches
2014-07-01 15:44     ` Fabian Frederick

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=1404161370.2717.10.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@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 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®