1. 13 7月, 2011 1 次提交
    • D
      dlm: improve rsb searches · 3881ac04
      David Teigland 提交于
      By pre-allocating rsb structs before searching the hash
      table, they can be inserted immediately.  This avoids
      always having to repeat the search when adding the struct
      to hash list.
      
      This also adds space to the rsb struct for a max resource
      name, so an rsb allocation can be used by any request.
      The constant size also allows us to finally use a slab
      for the rsb structs.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      3881ac04
  2. 11 7月, 2011 3 次提交
  3. 05 4月, 2011 1 次提交
  4. 02 4月, 2011 1 次提交
  5. 31 3月, 2011 1 次提交
  6. 11 3月, 2011 1 次提交
    • D
      dlm: record full callback state · 8304d6f2
      David Teigland 提交于
      Change how callbacks are recorded for locks.  Previously, information
      about multiple callbacks was combined into a couple of variables that
      indicated what the end result should be.  In some situations, we
      could not tell from this combined state what the exact sequence of
      callbacks were, and would end up either delivering the callbacks in
      the wrong order, or suppress redundant callbacks incorrectly.  This
      new approach records all the data for each callback, leaving no
      uncertainty about what needs to be delivered.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      8304d6f2
  7. 03 9月, 2010 1 次提交
    • S
      dlm: Don't send callback to node making lock request when "try 1cb" fails · 314dd2a0
      Steven Whitehouse 提交于
      When converting a lock, an lkb is in the granted state and also being used
      to request a new state. In the case that the conversion was a "try 1cb"
      type which has failed, and if the new state was incompatible with the old
      state, a callback was being generated to the requesting node. This is
      incorrect as callbacks should only be sent to all the other nodes holding
      blocking locks. The requesting node should receive the normal (failed)
      response to its "try 1cb" conversion request only.
      
      This was discovered while debugging a performance problem on GFS2, however
      this fix also speeds up GFS as well. In the GFS2 case the performance gain
      is over 10x for cases of write activity to an inode whose glock is cached
      on another, idle (wrt that glock) node.
      
      (comment added, dct)
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Tested-by: NAbhijith Das <adas@redhat.com>
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      314dd2a0
  8. 01 5月, 2010 1 次提交
  9. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  10. 27 2月, 2010 2 次提交
    • D
      dlm: use bastmode in debugfs output · b6fa8796
      David Teigland 提交于
      The bast mode that appears in the debugfs output should be
      useful on both master and process nodes.  lkb_highbast is
      currently printed, and is only useful on the master node.
      lkb_bastmode is only useful on the process node.  This
      patch sets lkb_bastmode on the master node as well, and
      uses that value in the debugfs print.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      b6fa8796
    • D
      dlm: send reply before bast · cf6620ac
      David Teigland 提交于
      When the lock master processes a successful operation (request,
      convert, cancel, or unlock), it will process the effects of the
      change before sending the reply for the operation.  The "effects"
      of the operation are:
      
      - blocking callbacks (basts) for any newly granted locks
      - waiting or converting locks that can now be granted
      
      The cast is queued on the local node when the reply from the lock
      master is received.  This means that a lock holder can receive a
      bast for a lock mode that is doesn't yet know has been granted.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      cf6620ac
  11. 25 2月, 2010 1 次提交
    • D
      dlm: fix ordering of bast and cast · 7fe2b319
      David Teigland 提交于
      When both blocking and completion callbacks are queued for lock,
      the dlm would always deliver the completion callback (cast) first.
      In some cases the blocking callback (bast) is queued before the
      cast, though, and should be delivered first.  This patch keeps
      track of the order in which they were queued and delivers them
      in that order.
      
      This patch also keeps track of the granted mode in the last cast
      and eliminates the following bast if the bast mode is compatible
      with the preceding cast mode.  This happens when a remotely mastered
      lock is demoted, e.g. EX->NL, in which case the local node queues
      a cast immediately after sending the demote message.  In this way
      a cast can be queued for a mode, e.g. NL, that makes an in-transit
      bast extraneous.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      7fe2b319
  12. 01 12月, 2009 1 次提交
    • D
      dlm: always use GFP_NOFS · 573c24c4
      David Teigland 提交于
      Replace all GFP_KERNEL and ls_allocation with GFP_NOFS.
      ls_allocation would be GFP_KERNEL for userland lockspaces
      and GFP_NOFS for file system lockspaces.
      
      It was discovered that any lockspaces on the system can
      affect all others by triggering memory reclaim in the
      file system which could in turn call back into the dlm
      to acquire locks, deadlocking dlm threads that were
      shared by all lockspaces, like dlm_recv.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      573c24c4
  13. 18 6月, 2009 1 次提交
  14. 12 3月, 2009 2 次提交
  15. 09 1月, 2009 1 次提交
  16. 24 12月, 2008 3 次提交
  17. 15 7月, 2008 2 次提交
  18. 22 4月, 2008 2 次提交
  19. 07 2月, 2008 1 次提交
  20. 06 2月, 2008 1 次提交
  21. 04 2月, 2008 7 次提交
  22. 31 1月, 2008 5 次提交
    • D
      dlm: keep cached master rsbs during recovery · 85f0379a
      David Teigland 提交于
      To prevent the master of an rsb from changing rapidly, an unused rsb is kept
      on the "toss list" for a period of time to be reused.  The toss list was
      being cleared completely for each recovery, which is unnecessary.  Much of
      the benefit of the toss list can be maintained if nodes keep rsb's in their
      toss list that they are the master of.  These rsb's need to be included
      when the resource directory is rebuilt during recovery.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      85f0379a
    • D
      dlm: change error message to debug · 594199eb
      David Teigland 提交于
      The invalid lockspace messages are normal and can appear relatively
      often.  They should be suppressed without debugging enabled.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      594199eb
    • D
      dlm: limit dir lookup loop · 755b5eb8
      David Teigland 提交于
      In a rare case we may need to repeat a local resource directory lookup
      due to a race with removing the rsb and removing the resdir record.
      We'll never need to do more than a single additional lookup, though,
      so the infinite loop around the lookup can be removed.  In addition
      to being unnecessary, the infinite loop is dangerous since some other
      unknown condition may appear causing the loop to never break.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      755b5eb8
    • D
      dlm: reject normal unlock when lock is waiting for lookup · 42dc1601
      David Teigland 提交于
      Non-forced unlocks should be rejected if the lock is waiting on the
      rsb_lookup list for another lock to establish the master node.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      42dc1601
    • D
      dlm: validate messages before processing · c54e04b0
      David Teigland 提交于
      There was some hit and miss validation of messages that has now been
      cleaned up and unified.  Before processing a message, the new
      validate_message() function checks that the lkb is the appropriate type,
      process-copy or master-copy, and that the message is from the correct
      nodeid for the the given lkb.  Other checks and assertions on the
      lkb type and nodeid have been removed.  The assertions were particularly
      bad since they would panic the machine instead of just ignoring the bad
      message.
      
      Although other recent patches have made processing old message unlikely,
      it still may be possible for an old message to be processed and caught
      by these checks.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      c54e04b0