All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 00/16] nfsd: duplicate reply cache overhaul
@ 2013-01-28 19:41 Jeff Layton
  2013-01-28 19:41 ` [PATCH v1 01/16] nfsd: fix IPv6 address handling in the DRC Jeff Layton
                   ` (15 more replies)
  0 siblings, 16 replies; 42+ messages in thread
From: Jeff Layton @ 2013-01-28 19:41 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

Our QA group has been reporting on and off for the last several years
about occasional failures in testing, especially on UDP. When we go to
look at traces, we see a missing reply from a server on a non-idempotent
request. The client then retransmits the request and the server tries to
redo it instead of just sending the DRC entry.

With an instrumented kernel on the server and a synthetic reproducer, we
found that it's quite easy to hammer the server so fast the DRC entries
get flushed out long before a retransmit can come in.

This patchset is a first pass at fixing this. Instead of simply keeping
a cache of the last 1024 entries, it allows nfsd to grow and shrink the
DRC dynamically.

The first patch is a bugfix for IPv6 support. The next several are
cleanups and reorganizations of the existing code. The tenth patch makes
them dynamically allocated, and the ones following that add various
mechanisms to help keep the cache to a manageable size. The final patch
adds the ability to checksum the first part the request, intended as a
way to mitigate the effects of an XID collision.

While most of us will probably say "so what" when it comes to UDP
failures, it's a potential problem on connected transports as well. I'm
also inclined to try and fix things that screw up the people that are
helping us test our code.

I'd like to see this merged for 3.9 if possible...

Jeff Layton (16):
  nfsd: fix IPv6 address handling in the DRC
  nfsd: remove unneeded spinlock in nfsd_cache_update
  nfsd: get rid of RC_INTR
  nfsd: create a dedicated slabcache for DRC entries
  nfsd: add alloc and free functions for DRC entries
  nfsd: remove redundant test from nfsd_reply_cache_free
  nfsd: clean up and clarify the cache expiration code
  nfsd: break out hashtable search into separate function
  nfsd: always move DRC entries to the end of LRU list when updating
    timestamp
  nfsd: dynamically allocate DRC entries
  nfsd: remove the cache_disabled flag
  nfsd: when updating an entry with RC_NOCACHE, just free it
  nfsd: add recurring workqueue job to clean the cache
  nfsd: track the number of DRC entries in the cache
  nfsd: register a shrinker for DRC cache entries
  nfsd: keep a checksum of the first 256 bytes of request

 fs/nfsd/cache.h             |  17 ++-
 fs/nfsd/nfscache.c          | 337 ++++++++++++++++++++++++++++++++++----------
 fs/nfsd/nfssvc.c            |   1 -
 include/linux/sunrpc/clnt.h |   4 +-
 4 files changed, 278 insertions(+), 81 deletions(-)

-- 
1.7.11.7


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

end of thread, other threads:[~2013-02-01 16:05 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 19:41 [PATCH v1 00/16] nfsd: duplicate reply cache overhaul Jeff Layton
2013-01-28 19:41 ` [PATCH v1 01/16] nfsd: fix IPv6 address handling in the DRC Jeff Layton
2013-01-28 19:51   ` Chuck Lever
2013-01-28 20:05     ` Jeff Layton
2013-01-28 20:16       ` Chuck Lever
2013-01-28 20:26         ` Jeff Layton
2013-01-28 20:34           ` Chuck Lever
2013-01-28 20:45             ` Jeff Layton
2013-01-28 20:54               ` Chuck Lever
2013-01-28 21:06                 ` Jeff Layton
2013-01-28 21:32                   ` Chuck Lever
2013-01-29 13:33                     ` Jeff Layton
2013-01-31 20:59   ` J. Bruce Fields
2013-01-31 21:06     ` Jeff Layton
2013-01-28 19:41 ` [PATCH v1 02/16] nfsd: remove unneeded spinlock in nfsd_cache_update Jeff Layton
2013-01-31 21:23   ` J. Bruce Fields
2013-01-28 19:41 ` [PATCH v1 03/16] nfsd: get rid of RC_INTR Jeff Layton
2013-01-28 19:41 ` [PATCH v1 04/16] nfsd: create a dedicated slabcache for DRC entries Jeff Layton
2013-01-28 19:41 ` [PATCH v1 05/16] nfsd: add alloc and free functions " Jeff Layton
2013-01-28 19:41 ` [PATCH v1 06/16] nfsd: remove redundant test from nfsd_reply_cache_free Jeff Layton
2013-01-28 19:41 ` [PATCH v1 07/16] nfsd: clean up and clarify the cache expiration code Jeff Layton
2013-01-28 19:41 ` [PATCH v1 08/16] nfsd: break out hashtable search into separate function Jeff Layton
2013-02-01 13:14   ` J. Bruce Fields
2013-02-01 15:26     ` Jeff Layton
2013-02-01 15:48       ` Jeff Layton
2013-02-01 15:51       ` J. Bruce Fields
2013-02-01 16:01         ` Jeff Layton
2013-02-01 16:05           ` J. Bruce Fields
2013-01-28 19:41 ` [PATCH v1 09/16] nfsd: always move DRC entries to the end of LRU list when updating timestamp Jeff Layton
2013-01-28 19:41 ` [PATCH v1 10/16] nfsd: dynamically allocate DRC entries Jeff Layton
2013-01-30 15:16   ` J. Bruce Fields
2013-01-30 15:20     ` Jeff Layton
2013-01-28 19:41 ` [PATCH v1 11/16] nfsd: remove the cache_disabled flag Jeff Layton
2013-01-28 19:41 ` [PATCH v1 12/16] nfsd: when updating an entry with RC_NOCACHE, just free it Jeff Layton
2013-01-28 19:41 ` [PATCH v1 13/16] nfsd: add recurring workqueue job to clean the cache Jeff Layton
2013-01-28 19:41 ` [PATCH v1 14/16] nfsd: track the number of DRC entries in " Jeff Layton
2013-01-28 19:41 ` [PATCH v1 15/16] nfsd: register a shrinker for DRC cache entries Jeff Layton
2013-01-30 15:24   ` J. Bruce Fields
2013-01-30 15:37     ` Jeff Layton
2013-01-28 19:41 ` [PATCH v1 16/16] nfsd: keep a checksum of the first 256 bytes of request Jeff Layton
2013-01-29 18:20   ` Jeff Layton
2013-01-30 15:14   ` J. Bruce Fields

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.