linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] sunrpc: use monotonic time for expiry times
@ 2010-02-17  6:47 NeilBrown
       [not found] ` <20100217064330.13656.61404.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: NeilBrown @ 2010-02-17  6:47 UTC (permalink / raw)
  To: J. Bruce Fields, Trond Myklebust; +Cc: linux-nfs

I've always known I would pay for this some day ....

The authentication cache uses wall-clock time for expiry times and
related time stamps.

This can cause problems if the wall-clock time changes suddenly.
e.g. if you set the time forward one hour, the export cache is
immediately flushed.  This isn't an enormous problem, but it should be
fixed.

Currently, it can cause clients to have to resend requests which can
cause a delay of several timeouts.  Once we get the improvements in
which allow a thread to wait for a while rather than dropping a
request, this will be less of an issue.  But I think it is worth
fixing anyway.

So: two patches.  One moves come common code to an inline, the other
makes the change.

comments?

Thanks,
NeilBrown

---

NeilBrown (2):
      sunrpc: extract some common sunrpc_cache code from nfsd
      sunrpc: use monotonic time in expiry cache


 fs/nfs/dns_resolve.c         |    6 +++---
 fs/nfsd/export.c             |    9 +++------
 fs/nfsd/nfs4idmap.c          |    2 +-
 include/linux/sunrpc/cache.h |   23 ++++++++++++++++++++++-
 net/sunrpc/cache.c           |   33 ++++++++++++++++++---------------
 5 files changed, 47 insertions(+), 26 deletions(-)



^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 0/2] Use monotonic time stamps in sunrpc auth cache.
@ 2010-08-12  6:55 NeilBrown
  2010-08-12  6:55 ` [PATCH 2/2] sunrpc: use monotonic time in expiry cache NeilBrown
  0 siblings, 1 reply; 9+ messages in thread
From: NeilBrown @ 2010-08-12  6:55 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

A 6 month release cycles seems to be popular these days, and it is six
months since I last posted these, so I guess it is time to post them
again (yes, I've been busy and forgot all about them - but I still
think they are important).

If you set your system time backwards, nfsd can end up caching things
much longer than it should.  And if you set if very far forward,
caches will get flushed too early.

So change all time keeping to use a monotonic time based on
getboottime.

A few issues were raised last time I posted these:
   http://www.spinics.net/lists/linux-nfs/msg11515.html
I think they have all been addressed now.

Thanks,
NeilBrown

---

NeilBrown (2):
      sunrpc: extract some common sunrpc_cache code from nfsd
      sunrpc: use monotonic time in expiry cache


 fs/nfs/dns_resolve.c         |    6 +++---
 fs/nfsd/export.c             |    9 +++------
 fs/nfsd/nfs4idmap.c          |    2 +-
 include/linux/sunrpc/cache.h |   23 ++++++++++++++++++++++-
 net/sunrpc/cache.c           |   37 ++++++++++++++++++++-----------------
 5 files changed, 49 insertions(+), 28 deletions(-)

-- 


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

end of thread, other threads:[~2010-08-25 16:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-17  6:47 [PATCH 0/2] sunrpc: use monotonic time for expiry times NeilBrown
     [not found] ` <20100217064330.13656.61404.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-02-17  6:47   ` [PATCH 1/2] sunrpc: extract some common sunrpc_cache code from nfsd NeilBrown
2010-02-17  6:47   ` [PATCH 2/2] sunrpc: use monotonic time in expiry cache NeilBrown
     [not found]     ` <20100217064730.13656.67205.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-02-17 22:00       ` Chuck Lever
2010-03-02  4:11         ` Neil Brown
  -- strict thread matches above, loose matches on Subject: below --
2010-08-12  6:55 [PATCH 0/2] Use monotonic time stamps in sunrpc auth cache NeilBrown
2010-08-12  6:55 ` [PATCH 2/2] sunrpc: use monotonic time in expiry cache NeilBrown
2010-08-24 18:15   ` J. Bruce Fields
2010-08-24 23:12     ` Neil Brown
2010-08-25 16:09       ` J. Bruce Fields

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