From: Jeff Layton <jlayton@poochiereds.net>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/4] fs: allow userland tasks to use delayed_fput infrastructure
Date: Thu, 17 Sep 2015 08:39:43 -0400 [thread overview]
Message-ID: <1442493587-32499-1-git-send-email-jeff.layton@primarydata.com> (raw)
v2:
- kerneldoc header cleanups. Hopefully they are more clear now
- make fput_queue return bool, telling whether the final reference was
put. Caller can use that to tell whether it should call
flush_delayed_fput.
Only minor changes since the last set. Al, does this look any more
reasonable? Original cover letter follows:
I'm breaking this piece out of the open file cache work for nfsd to see
if we can get this piece settled before I re-post the whole set. If this
looks like a reasonable approach we can sort out how it should be merged
(either by you directly, or via Bruce's tree with the rest of the open
file cache patches).
For those just joining in, some background:
We want to add an open file cache for nfsd to reduce the open/close
overhead on READ/WRITE RPCs, and so we can eliminate the raparm cache.
The basic idea is to keep a cache of open files, and close them down on
certain sorts of activity -- primarily, after an unlink that takes the
link count to 0, or before setting a lease.
The setlease part is problematic though. The plan is to have a notifier
callback into nfsd from vfs_setlease that will tell nfsd to close any
open files that are associated with the inode so we don't block lease
attempts solely due to cached but otherwise idle nfsd files. That means
that we need to be able to close out the files and ensure that the final
__fput runs before we try to set a lease.
My latest pass involved making __fput_sync available to userland tasks,
but Al had concerns that that could lead to stack blowouts and locking
issues. This patchset is an alternative approach that allows userland
tasks to use the delayed_fput infrastructure instead. The idea is that
we'd have the pre-setlease notifier do a fput_queue() and then call
flush_delayed_fput to ensure that any queued __fput() calls complete
before setting the lease.
There's also a fix for a potential race in flush_delayed_fput in here
and some doc comment cleanups.
Jeff Layton (4):
fs: have flush_delayed_fput flush the workqueue job
fs: add a kerneldoc header to fput
fs: add fput_queue
fs: export flush_delayed_fput
fs/file_table.c | 76 +++++++++++++++++++++++++++++++++++++++++++---------
include/linux/file.h | 1 +
2 files changed, 64 insertions(+), 13 deletions(-)
--
2.4.3
next reply other threads:[~2015-09-17 12:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 12:39 Jeff Layton [this message]
2015-09-17 12:39 ` [PATCH v2 1/4] fs: have flush_delayed_fput flush the workqueue job Jeff Layton
2015-10-04 13:35 ` Jeff Layton
2015-09-17 12:39 ` [PATCH v2 2/4] fs: add a kerneldoc header to fput Jeff Layton
2015-09-17 12:39 ` [PATCH v2 3/4] fs: add fput_queue Jeff Layton
2015-09-17 12:39 ` [PATCH v2 4/4] fs: export flush_delayed_fput Jeff Layton
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=1442493587-32499-1-git-send-email-jeff.layton@primarydata.com \
--to=jlayton@poochiereds.net \
--cc=bfields@fieldses.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).