From: David Howells <dhowells@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
Andrew Morton <akpm@osdl.org>,
linux-fsdevel@vger.kernel.org, sct@redhat.com
Subject: Re: [PATCH 14/21] FS-Cache: Avoid ENFILE checking for kernel-specific open files
Date: Fri, 07 Jul 2006 13:36:56 +0100 [thread overview]
Message-ID: <2308.1152275816@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060707095435.GA28497@infradead.org>
Christoph Hellwig <hch@infradead.org> wrote:
> > Make it possible to avoid ENFILE checking for kernel specific open files,
> > such as are used by the CacheFiles module.
> >
> > After, for example, tarring up a kernel source tree over the network, the
> > CacheFiles module may easily have 20000+ files open in the backing
> > filesystem, thus causing all non-root processes to be given error ENFILE
> > when they try to open a file, socket, pipe, etc..
>
> Big fat NACK/. If you don't want file accouting don't use files.
File accounting is to prevent *userspace* from executing a DoS attack.
"struct file" is the interface I have to use.
I'd prefer to only have to deal with inodes or maybe dentries and inodes - but
various interfaces seem to require it. I'm trying to keep the memory usage
down.
> The actual users of this unfortunately wasn't posted,
That's not my fault. Trond or the mailing list seems to have lost patch 18/21
somewhere.
> but it's using files only as the optional arguments to ->readpage, to call
> ->flush and for ->setattr. You could do all that aswell at the fs level.
No, I couldn't. I'm trying to keep the VFS API changes down for the moment.
Besides, you're list of ops that seem to require it is incomplete.
> Besides that unposted patch adds various odd exports,
Yes, and?
> another silly write something variant in filemap.c, etc..
And how am I supposed to do this otherwise? I don't want to muck about with
kiocb's and iovecs aren't any use, also I'm going to write one page and
exactly one page, so I can optimise it quite well.
I could move this function into cachefiles, but judging from past performance
you'd blow a gasket if I did. Also, I'm not sure that all the functions it
calls are globally available.
> Also the documentation claims it needs FIBMAP support from userspace which
> is a big no-way.
Actually, I don't use FIBMAP at all. I was just using that to guide people to
what I meant by bmap().
There isn't any way around using bmap() at the moment. The current AIO
interface just isn't usable for this as is, and I have to detect holes somehow
(I'd *like* to add O_NOHOLE and use O_DIRECT, but that looks like a major
upheaval will be required in the VM/VFS).
This works for the moment, permitting the other bits to be tested more widely.
> Can we please get a clear description why all this bloat is needed?
You have one. Read the description. Then go and re-read the discussion back
on the 20th of April.
I'm sorry you don't have a new copy of the CacheFiles patch. You can find it
in:
http://people.redhat.com/~dhowells/nfs/nfs+fscache.tar.bz2
> Also please don't add _MODULE ifdefs in headers.
What choice do I have? CONFIG_FSCACHE is not defined if CONFIG_FSCACHE_MODULE
is.
David
next prev parent reply other threads:[~2006-07-07 12:37 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 14:54 [PATCH 00/21] FSCACHE support for AFS and NFS Trond Myklebust
2006-07-06 15:10 ` [PATCH 01/21] NFS: Add dentry materialisation op Trond Myklebust
2006-07-06 15:10 ` [PATCH 02/21] NFS: Fix up split of fs/nfs/inode.c Trond Myklebust
2006-07-06 15:10 ` [PATCH 03/21] NFS: Disambiguate nfs_stat_to_errno() Trond Myklebust
2006-07-06 15:10 ` [PATCH 04/21] NFS: Fix NFS4 callback up/down prototypes Trond Myklebust
2006-07-06 15:10 ` [PATCH 05/21] NFS: Rename struct nfs4_client to struct nfs_client Trond Myklebust
2006-07-06 15:10 ` [PATCH 06/21] NFS: Rename nfs_server::nfs4_state Trond Myklebust
2006-07-06 15:10 ` [PATCH 07/21] NFS: Return an error when starting the idmapping pipe Trond Myklebust
2006-07-06 15:10 ` [PATCH 08/21] NFS: Add a lookupfh NFS RPC op Trond Myklebust
2006-07-07 1:31 ` Andrew Morton
2006-07-06 15:10 ` [PATCH 09/21] " Trond Myklebust
2006-07-06 15:10 ` [PATCH 10/21] NFS: Generalise the nfs_client structure Trond Myklebust
2006-07-06 15:10 ` [PATCH 12/21] NFS: Add server and volume lists to /proc Trond Myklebust
2006-07-06 15:10 ` [PATCH 13/21] FS-Cache: Provide a filesystem-specific sync'able page bit Trond Myklebust
2006-07-06 15:10 ` [PATCH 14/21] FS-Cache: Avoid ENFILE checking for kernel-specific open files Trond Myklebust
2006-07-07 1:56 ` Andrew Morton
2006-07-07 9:54 ` Christoph Hellwig
2006-07-07 14:26 ` Trond Myklebust
2006-07-07 12:36 ` David Howells [this message]
2006-07-06 15:10 ` [PATCH 16/21] FS-Cache: Release page->private in failed readahead Trond Myklebust
2006-07-07 1:56 ` Andrew Morton
2006-07-07 9:18 ` David Howells
2006-07-06 15:11 ` [PATCH 17/21] FS-Cache: Make kAFS use FS-Cache Trond Myklebust
2006-07-06 15:11 ` [PATCH 19/21] NFS: Use local caching Trond Myklebust
2006-07-06 15:11 ` [PATCH 20/21] AUTOFS: Make sure all dentries refs are released before calling kill_anon_super() Trond Myklebust
2006-07-07 1:56 ` Andrew Morton
2006-07-07 3:15 ` Ian Kent
2006-07-07 3:23 ` Andrew Morton
2006-07-07 3:50 ` Ian Kent
2006-07-06 15:11 ` [PATCH 21/21] VFS: Destroy the dentries contributed by a superblock on unmounting Trond Myklebust
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=2308.1152275816@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sct@redhat.com \
/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).