public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] proc: make proc entry's len "unsigned int"
Date: Wed, 5 Jan 2011 10:45:43 +0200	[thread overview]
Message-ID: <20110105084543.GA4598@p183.telecom.by> (raw)
In-Reply-To: <20110104165159.49c257b7.akpm@linux-foundation.org>

On Tue, Jan 04, 2011 at 04:51:59PM -0800, Andrew Morton wrote:
> On Fri, 26 Nov 2010 23:10:33 +0200
> Alexey Dobriyan <adobriyan@gmail.com> wrote:

> >  struct proc_dir_entry {
> >  	unsigned int low_ino;
> > -	unsigned short namelen;
> > +	unsigned int namelen;
> >  	const char *name;
> >  	mode_t mode;
> >  	nlink_t nlink;
> 
> Well, if we _can_ save some space here then the returns would be
> appreciable.
> 
> akpm:/home/akpm# find /proc | wc -l
> 95543
> 
> (wtf?)
> 
> akpm:/home/akpm# find /proc/[0-9]* | wc -l
> 94212
> 
> (oh.)

Different number of processes?

> Do all of those things have a proc_dir_entry?

No!

> IIRC we changed things so they're somewhat allocate-on-demand.

Only /proc/$PID and /proc/sys/* are on-demand allocated.
The rest has struct proc_dir_entry associated.

      reply	other threads:[~2011-01-05  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 21:10 [PATCH] proc: make proc entry's len "unsigned int" Alexey Dobriyan
2010-11-26 23:58 ` Joe Perches
2011-01-05  0:51 ` Andrew Morton
2011-01-05  8:45   ` Alexey Dobriyan [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=20110105084543.GA4598@p183.telecom.by \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --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