Re: [PATCH] proc: make proc entry's len "unsigned int"

From: Alexey Dobriyan
Date: Wed Jan 05 2011 - 03:45:52 EST


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@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/