All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 00/11] RFC: Split nlm_host cache
Date: Thu, 09 Dec 2010 11:48:08 -0500	[thread overview]
Message-ID: <20101209163555.4513.94435.stgit@matisse.1015granger.net> (raw)

This patch series splits the nlm_host cache into a client-only and
server-only cache.  Originally this cache contained entries for both
client and server peers.

The garbage collection logic for this cache is convoluted.  The
purpose of GC in this cache is to prevent an nlm_host from vanishing
for a while, even if it's reference count is zero.  This is because no
reference is held between incoming NLM requests.  We want to keep
these entries around to reduce the overall expense of creating them.

However, GC is unnecessary on the client side, since the client holds
a reference to an nlm_host as long as it has the server mounted.
After unmounting, the nlm_host isn't needed.

Note that for NLM callbacks, there are already two entries in the
nlm_host cache for a peer, since a client lookup can't match if
h_server is asserted (and vice versa).

Splitting the nlm_host cache might allow further simplifications.
First, Bruce has suggested replacing the GC mechanism with a simpler
LRU scheme.  Another possibility would be to replace the hash tables
with red-black trees; this would take up less memory, and we would no
longer have to worry about the efficacy of the nlm_host hash function.

Comments?

---

Chuck Lever (9):
      lockd: Remove src_sap and src_len from nlm_lookup_host_info struct
      lockd: Remove nlm_lookup_host()
      lockd: Make nrhosts an unsigned long
      lockd: Rename nlm_hosts
      lockd: Clean up nlmsvc_lookup_host()
      lockd: Create client-side nlm_host cache
      lockd: Split nlm_release_call()
      lockd: Add nlm_destroy_host_locked()
      lockd: Add nlm_alloc_host()

J. Bruce Fields (2):
      lockd: reorganize nlm_host_rebooted
      lockd: define host_for_each{_safe} macros


 fs/lockd/clntlock.c         |    4 
 fs/lockd/clntproc.c         |   18 +-
 fs/lockd/host.c             |  404 ++++++++++++++++++++++++++-----------------
 fs/lockd/svc4proc.c         |   20 +-
 fs/lockd/svclock.c          |    4 
 fs/lockd/svcproc.c          |   28 ++-
 include/linux/lockd/lockd.h |    6 -
 7 files changed, 286 insertions(+), 198 deletions(-)

-- 
Chuck Lever

             reply	other threads:[~2010-12-09 16:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 16:48 Chuck Lever [this message]
2010-12-09 16:48 ` [PATCH 01/11] lockd: define host_for_each{_safe} macros Chuck Lever
2010-12-09 16:48 ` [PATCH 02/11] lockd: reorganize nlm_host_rebooted Chuck Lever
2010-12-09 16:48 ` [PATCH 03/11] lockd: Add nlm_alloc_host() Chuck Lever
2010-12-09 16:58   ` Trond Myklebust
2010-12-09 17:06     ` Chuck Lever
2010-12-09 16:48 ` [PATCH 04/11] lockd: Add nlm_destroy_host_locked() Chuck Lever
2010-12-09 16:48 ` [PATCH 05/11] lockd: Split nlm_release_call() Chuck Lever
2010-12-09 16:49 ` [PATCH 06/11] lockd: Create client-side nlm_host cache Chuck Lever
2010-12-09 16:49 ` [PATCH 07/11] lockd: Clean up nlmsvc_lookup_host() Chuck Lever
2010-12-09 16:49 ` [PATCH 08/11] lockd: Rename nlm_hosts Chuck Lever
2010-12-09 16:50 ` [PATCH 09/11] lockd: Make nrhosts an unsigned long Chuck Lever
2010-12-09 16:50 ` [PATCH 10/11] lockd: Remove nlm_lookup_host() Chuck Lever
2010-12-09 16:50 ` [PATCH 11/11] lockd: Remove src_sap and src_len from nlm_lookup_host_info struct Chuck Lever

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=20101209163555.4513.94435.stgit@matisse.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.