1. 30 9月, 2008 6 次提交
  2. 24 4月, 2008 4 次提交
    • J
      lockd: convert nsm_mutex to a spinlock · d8421202
      J. Bruce Fields 提交于
      There's no reason for a mutex here, except to allow an allocation under
      the lock, which we can avoid with the usual trick of preallocating
      memory for the new object and freeing it if it turns out to be
      unnecessary.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      d8421202
    • J
      lockd: clean up __nsm_find() · a95e56e7
      J. Bruce Fields 提交于
      Use list_for_each_entry().  Also, in keeping with kernel style, make the
      normal case (kzalloc succeeds) unindented and handle the abnormal case
      with a goto.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      a95e56e7
    • J
      lockd: fix race in nlm_release() · 164f98ad
      J. Bruce Fields 提交于
      The sm_count is decremented to zero but left on the nsm_handles list.
      So in the space between decrementing sm_count and acquiring nsm_mutex,
      it is possible for another task to find this nsm_handle, increment the
      use count and then enter nsm_release itself.
      
      Thus there's nothing to prevent the nsm being freed before we acquire
      nsm_mutex here.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      164f98ad
    • N
      knfsd: Remove NLM_HOST_MAX and associated logic. · 1447d25e
      NeilBrown 提交于
      Lockd caches information about hosts that have recently held locks to
      expedite the taking of further locks.
      
      It periodically discards this information for hosts that have not been
      used for a few minutes.
      
      lockd currently has a value NLM_HOST_MAX, and changes the 'garbage
      collection' behaviour when the number of hosts exceeds this threshold.
      
      However its behaviour is strange, and likely not what was intended.
      When the number of hosts exceeds the max, it scans *less* often (every
      2 minutes vs every minute) and allows unused host information to
      remain around longer (5 minutes instead of 2).
      
      Having this limit is of dubious value anyway, and we have not
      suffered from the code not getting the limit right, so remove the
      limit altogether.  We go with the larger values (discard 5 minute old
      hosts every 2 minutes) as they are probably safer.
      
      Maybe the periodic garbage collection should be replace to with
      'shrinker' handler so we just respond to memory pressure....
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      1447d25e
  3. 20 3月, 2008 1 次提交
  4. 11 2月, 2008 2 次提交
    • J
      NLM: have server-side RPC clients default to soft RPC tasks · 90bd17c8
      Jeff Layton 提交于
      Now that it no longer does an RPC ping, lockd always ends up queueing
      an RPC task for the GRANT_MSG callback. But, it also requeues the block
      for later attempts. Since these are hard RPC tasks, if the client we're
      calling back goes unresponsive the GRANT_MSG callbacks can stack up in
      the RPC queue.
      
      Fix this by making server-side RPC clients default to soft RPC tasks.
      lockd requeues the block anyway, so this should be OK.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      90bd17c8
    • J
      NLM: set RPC_CLNT_CREATE_NOPING for NLM RPC clients · 031fd3aa
      Jeff Layton 提交于
      It's currently possible for an unresponsive NLM client to completely
      lock up a server's lockd. The scenario is something like this:
      
      1) client1 (or a process on the server) takes a lock on a file
      2) client2 tries to take a blocking lock on the same file and
         awaits the callback
      3) client2 goes unresponsive (plug pulled, network partition, etc)
      4) client1 releases the lock
      
      ...at that point the server's lockd will try to queue up a GRANT_MSG
      callback for client2, but first it requeues the block with a timeout of
      30s. nlm_async_call will attempt to bind the RPC client to client2 and
      will call rpc_ping. rpc_ping entails a sync RPC call and if client2 is
      unresponsive it will take around 60s for that to time out. Once it times
      out, it's already time to retry the block and the whole process repeats.
      
      Once in this situation, nlmsvc_retry_blocked will never return until
      the host starts responding again. lockd won't service new calls.
      
      Fix this by skipping the RPC ping on NLM RPC clients. This makes
      nlm_async_call return quickly when called.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      031fd3aa
  5. 02 2月, 2008 2 次提交
  6. 11 7月, 2007 2 次提交
  7. 15 5月, 2007 1 次提交
  8. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  9. 13 2月, 2007 1 次提交
  10. 08 12月, 2006 1 次提交
  11. 04 10月, 2006 12 次提交
  12. 27 9月, 2006 1 次提交
  13. 23 9月, 2006 2 次提交
  14. 09 6月, 2006 2 次提交
  15. 27 3月, 2006 1 次提交
    • I
      [PATCH] sem2mutex: fs/ · 353ab6e9
      Ingo Molnar 提交于
      Semaphore to mutex conversion.
      
      The conversion was generated via scripts, and the result was validated
      automatically via a script as well.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
      Cc: Robert Love <rml@tech9.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      353ab6e9
  16. 21 3月, 2006 1 次提交