From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: hch@infradead.org, aviro@redhat.com, nfsv4@linux-nfs.org,
linux-kernel@vger.kernel.org, torvalds@osdl.org,
linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/7] FS-Cache: Avoid ENFILE checking for kernel-specific open files
Date: Fri, 21 Apr 2006 11:57:09 +0100 [thread overview]
Message-ID: <31581.1145617029@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060420171118.119ddb4e.akpm@osdl.org>
Andrew Morton <akpm@osdl.org> wrote:
> That would seem to be a great shortcoming in fscache.
It's not something that's easy to get around. The file has to be "open" to be
able to do certain operations on it.
> I guess as memory reclaim reaps the top-level dentries those file*'s will
> also be freed up, leading to their dentries becoming reclaimable, leading
> to their inodes being reclaimable.
Exactly.
> But still. Is it not possible to release those files-pinned-by-dcache when
> the top-level files are closed?
No, for three (or maybe four) reasons:
(1) You assume there's a "top-level" file open. AFS lookup(), for example,
will read the cache to get the directory contents, but there will _not_
be an open top-level file.
We could open and close the cache file in each lookup(), but that could
be very bad for lookup performance.
(2) mmap() may still have the struct file open, even though the last close()
has happened.
(3) There may be pages not yet written to the cache outstanding. These
belong to the netfs *inode* not the netfs *file*. Whilst the flush or
release file operation could be made to wait for these, that's not
necessarily within their spec, and could take a long time. How far is
the flush op supposed to go anyway?
(4) It prevents the data file going away whilst we have a cookie for it
(someone might go into the cache and delete something they shouldn't).
Pinning the dentry might work just as well, I suppose, but it makes
little difference to the resource consumption.
We keep at least the dentry available so that we can honour the netfs's
requests to update the auxiliary data as quickly as possible.
David
next prev parent reply other threads:[~2006-04-21 10:57 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-20 16:59 [PATCH 1/7] FS-Cache: Provide a filesystem-specific sync'able page bit David Howells
2006-04-20 16:59 ` [PATCH 2/7] FS-Cache: Add notification of page becoming writable to VMA ops David Howells
2006-04-20 17:40 ` Zach Brown
2006-04-20 18:27 ` Anton Altaparmakov
2006-04-20 16:59 ` [PATCH 3/7] FS-Cache: Avoid ENFILE checking for kernel-specific open files David Howells
2006-04-20 17:18 ` Christoph Hellwig
2006-04-20 18:06 ` David Howells
2006-04-21 0:11 ` Andrew Morton
2006-04-21 10:57 ` David Howells [this message]
2006-04-21 0:07 ` Andrew Morton
2006-04-21 12:33 ` David Howells
2006-04-21 18:22 ` Andrew Morton
2006-04-21 19:29 ` David Howells
2006-04-20 16:59 ` [PATCH 4/7] FS-Cache: Export find_get_pages() David Howells
2006-04-20 17:19 ` Christoph Hellwig
2006-04-20 17:45 ` David Howells
2006-04-21 0:15 ` Andrew Morton
2006-04-21 13:02 ` David Howells
2006-04-20 16:59 ` [PATCH 5/7] FS-Cache: Generic filesystem caching facility David Howells
2006-04-21 0:46 ` Andrew Morton
2006-04-21 14:15 ` David Howells
2006-04-21 18:38 ` Andrew Morton
2006-04-21 19:33 ` David Howells
2006-04-20 16:59 ` [PATCH 6/7] FS-Cache: Make kAFS use FS-Cache David Howells
2006-04-20 16:59 ` [PATCH 7/7] FS-Cache: CacheFiles: A cache that backs onto a mounted filesystem David Howells
2006-04-21 0:57 ` Andrew Morton
2006-04-21 1:16 ` Andrew Morton
2006-04-21 14:49 ` David Howells
2006-04-21 0:12 ` [PATCH 1/7] FS-Cache: Provide a filesystem-specific sync'able page bit Andrew Morton
2006-04-21 10:22 ` David Howells
2006-04-21 10:33 ` Andrew Morton
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=31581.1145617029@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=aviro@redhat.com \
--cc=hch@infradead.org \
--cc=linux-cachefs@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
--cc=torvalds@osdl.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).