Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Robin Holt <holt@sgi.com>
Cc: David Miller <davem@davemloft.net>,
	dipankar@in.ibm.com, viro@zeniv.linux.org.uk, bcrl@kvack.org,
	den@openvz.org, mingo@elte.hu, mszeredi@suse.cz, cmm@us.ibm.com,
	npiggin@kernel.dk, xemul@openvz.org,
	linux-kernel@vger.kernel.org, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH V3] fs: allow for more than 2^31 files
Date: Thu, 30 Sep 2010 22:45:45 +0200	[thread overview]
Message-ID: <1285879545.2705.4.camel@edumazet-laptop> (raw)
In-Reply-To: <20100930202612.GM14068@sgi.com>

Le jeudi 30 septembre 2010 à 15:26 -0500, Robin Holt a écrit :
> On Tue, Sep 28, 2010 at 05:46:51AM +0200, Eric Dumazet wrote:
> > Le lundi 27 septembre 2010 à 15:36 -0700, David Miller a écrit :
> ...
> 
> > Fix is to let /proc/sys/fs/file-nr & /proc/sys/fs/file-max use long
> > integers, and change af_unix to use an atomic_long_t instead of
> > atomic_t.
> > 
> > get_max_files() is changed to return an unsigned long.
> 
> I _THINK_ we actually want get_max_files to return a long and have
> the files_stat_struct definitions be longs.  If we do not have it that
> way, we could theoretically open enough files on a single cpu to make
> get_nr_files return a negative without overflowing max_files.  That,
> of course, would require an insane amount of memory, but I think it is
> technically more correct.
> 

Number of opened file is technically a positive (or null) value, I have
no idea why you want it being signed.

> 
> > --- a/kernel/sysctl.c
> > +++ b/kernel/sysctl.c
> > @@ -1352,16 +1352,16 @@ static struct ctl_table fs_table[] = {
> >  	{
> >  		.procname	= "file-nr",
> >  		.data		= &files_stat,
> > -		.maxlen		= 3*sizeof(int),
> > +		.maxlen		= sizeof(files_stat),
> >  		.mode		= 0444,
> > -		.proc_handler	= proc_nr_files,
> > +		.proc_handler	= proc_doulongvec_minmax,
> 
> With this change, don't we lose the current nr_files value?  I think
> you need proc_nr_files to stay as it was.  If you disagree, we should
> probably eliminate the definitions for proc_nr_files as I don't believe
> they are used anywhere else.
> 

I have no idea why you think I changed something. I only made the value
use 64bit on 64bit arches, so that we are not anymore limited to 2^31
files.




  reply	other threads:[~2010-09-30 20:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100923121704.GR14064@sgi.com>
     [not found] ` <1285246384.362.3.camel@edumazet-laptop>
     [not found]   ` <20100923141037.GA3811@in.ibm.com>
     [not found]     ` <20100927.153639.212415479.davem@davemloft.net>
2010-09-28  3:46       ` [PATCH V3] fs: allow for more than 2^31 files Eric Dumazet
2010-09-28  4:10         ` David Miller
2010-09-30 20:26         ` Robin Holt
2010-09-30 20:45           ` Eric Dumazet [this message]
2010-10-01  4:34             ` Robin Holt
2010-10-01  5:03               ` Eric Dumazet
2010-10-01  5:29                 ` [PATCH V4] " Eric Dumazet
2010-10-01 13:38                   ` Robin Holt
2010-10-05  7:32                   ` Eric Dumazet

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=1285879545.2705.4.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=bcrl@kvack.org \
    --cc=cmm@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=den@openvz.org \
    --cc=dipankar@in.ibm.com \
    --cc=holt@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mszeredi@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=npiggin@kernel.dk \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xemul@openvz.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