lkml.org 
[lkml]   [2014]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 1/1] proc: constify seq_operations
From
Date
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




\
 
 \ /
  Last update: 2014-07-01 01:21    [W:0.147 / U:30.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site