All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] nlm_host cache split for 2.6.38
@ 2010-12-14 15:04 Chuck Lever
  2010-12-14 15:05 ` [PATCH 01/11] lockd: define host_for_each{_safe} macros Chuck Lever
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Chuck Lever @ 2010-12-14 15:04 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs

Trond-

This patch series splits the nlm_host cache into a client-side cache
and a server-side cache.  It lays the groundwork for further work in
this area to simplify and improve the efficiency of these caches by
tuning them for their specific tasks.

Note that the two caches continue to share reboot notification logic,
as statd does not distinguish between client and server peers, and
only a single downcall mechanism exists for both.

---

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             |  410 ++++++++++++++++++++++++++-----------------
 fs/lockd/svc4proc.c         |   20 +-
 fs/lockd/svclock.c          |    4 
 fs/lockd/svcproc.c          |   28 ++-
 include/linux/lockd/lockd.h |    6 -
 7 files changed, 291 insertions(+), 199 deletions(-)

-- 
Chuck Lever

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 00/11] RFC: Split nlm_host cache
@ 2010-12-09 16:48 Chuck Lever
  2010-12-09 16:48 ` [PATCH 02/11] lockd: reorganize nlm_host_rebooted Chuck Lever
  0 siblings, 1 reply; 13+ messages in thread
From: Chuck Lever @ 2010-12-09 16:48 UTC (permalink / raw)
  To: linux-nfs

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

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

end of thread, other threads:[~2010-12-14 15:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-14 15:04 [PATCH 00/11] nlm_host cache split for 2.6.38 Chuck Lever
2010-12-14 15:05 ` [PATCH 01/11] lockd: define host_for_each{_safe} macros Chuck Lever
2010-12-14 15:05 ` [PATCH 02/11] lockd: reorganize nlm_host_rebooted Chuck Lever
2010-12-14 15:05 ` [PATCH 03/11] lockd: Add nlm_alloc_host() Chuck Lever
2010-12-14 15:05 ` [PATCH 04/11] lockd: Add nlm_destroy_host_locked() Chuck Lever
2010-12-14 15:05 ` [PATCH 05/11] lockd: Split nlm_release_call() Chuck Lever
2010-12-14 15:05 ` [PATCH 06/11] lockd: Create client-side nlm_host cache Chuck Lever
2010-12-14 15:06 ` [PATCH 07/11] lockd: Clean up nlmsvc_lookup_host() Chuck Lever
2010-12-14 15:06 ` [PATCH 08/11] lockd: Rename nlm_hosts Chuck Lever
2010-12-14 15:06 ` [PATCH 09/11] lockd: Make nrhosts an unsigned long Chuck Lever
2010-12-14 15:06 ` [PATCH 10/11] lockd: Remove nlm_lookup_host() Chuck Lever
2010-12-14 15:06 ` [PATCH 11/11] lockd: Remove src_sap and src_len from nlm_lookup_host_info struct Chuck Lever
  -- strict thread matches above, loose matches on Subject: below --
2010-12-09 16:48 [PATCH 00/11] RFC: Split nlm_host cache Chuck Lever
2010-12-09 16:48 ` [PATCH 02/11] lockd: reorganize nlm_host_rebooted Chuck Lever

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.