linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Reduce the refcount pressure of NFS on struct cred
@ 2020-02-10 19:13 Trond Myklebust
  2020-02-10 19:13 ` [PATCH 1/8] NFS: alloc_nfs_open_context() must use the file cred when available Trond Myklebust
  0 siblings, 1 reply; 9+ messages in thread
From: Trond Myklebust @ 2020-02-10 19:13 UTC (permalink / raw)
  To: linux-nfs

The NFS and RPC layer currently always takes a reference to the
credential passed by the user, even in the case where the RPC call
is synchronous, or the cred is also being pinned by file pointers
and open contexts.
In addition, the access cache will take a reference for each cache entry
on each file that we've looked up.

This patch set attempts to reduce the amount of references that the NFS
layer holds, by optimising away a few cases where we're taking the
refcount unnecessarily. It also sets a more stringent limit on the
number of access cache entries that the NFS layer holds.

Trond Myklebust (8):
  NFS: alloc_nfs_open_context() must use the file cred when available
  SUNRPC: Add a flag to avoid reference counts on credentials
  SUNRPC: Don't take a reference to the cred on synchronous tasks
  NFS: Assume cred is pinned by open context in I/O requests
  NFSv4: Avoid referencing the cred unnecessarily during NFSv4 I/O
  NFSv4: Avoid unnecessary credential references in layoutget
  NFS: Avoid referencing the cred twice in async rename/unlink
  NFS: Limit the size of the access cache by default

 fs/nfs/dir.c                 |  2 +-
 fs/nfs/inode.c               | 10 +++++-----
 fs/nfs/nfs4proc.c            | 12 ++++++------
 fs/nfs/pagelist.c            |  2 +-
 fs/nfs/pnfs.c                |  3 +--
 fs/nfs/unlink.c              |  4 ++--
 fs/nfs/write.c               |  2 +-
 include/linux/sunrpc/sched.h |  1 +
 net/sunrpc/clnt.c            |  8 ++++++--
 net/sunrpc/sched.c           |  3 ++-
 10 files changed, 26 insertions(+), 21 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-10 19:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 19:13 [PATCH 0/8] Reduce the refcount pressure of NFS on struct cred Trond Myklebust
2020-02-10 19:13 ` [PATCH 1/8] NFS: alloc_nfs_open_context() must use the file cred when available Trond Myklebust
2020-02-10 19:13   ` [PATCH 2/8] SUNRPC: Add a flag to avoid reference counts on credentials Trond Myklebust
2020-02-10 19:13     ` [PATCH 3/8] SUNRPC: Don't take a reference to the cred on synchronous tasks Trond Myklebust
2020-02-10 19:13       ` [PATCH 4/8] NFS: Assume cred is pinned by open context in I/O requests Trond Myklebust
2020-02-10 19:13         ` [PATCH 5/8] NFSv4: Avoid referencing the cred unnecessarily during NFSv4 I/O Trond Myklebust
2020-02-10 19:13           ` [PATCH 6/8] NFSv4: Avoid unnecessary credential references in layoutget Trond Myklebust
2020-02-10 19:13             ` [PATCH 7/8] NFS: Avoid referencing the cred twice in async rename/unlink Trond Myklebust
2020-02-10 19:13               ` [PATCH 8/8] NFS: Limit the size of the access cache by default Trond Myklebust

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