netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	dipankar@in.ibm.com, holt@sgi.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 15:26:12 -0500	[thread overview]
Message-ID: <20100930202612.GM14068@sgi.com> (raw)
In-Reply-To: <1285645611.10438.27.camel@edumazet-laptop>

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.


> --- 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.


Thanks,
Robin

  parent reply	other threads:[~2010-09-30 20:26 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 [this message]
2010-09-30 20:45           ` Eric Dumazet
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=20100930202612.GM14068@sgi.com \
    --to=holt@sgi.com \
    --cc=bcrl@kvack.org \
    --cc=cmm@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=den@openvz.org \
    --cc=dipankar@in.ibm.com \
    --cc=eric.dumazet@gmail.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;
as well as URLs for NNTP newsgroup(s).