1. 17 Aug, 2009 3 commits
  2. 02 Aug, 2009 7 commits
    • Ming Lei's avatar
      lockdep: Fix memory usage info of BFS · 90629209
      Ming Lei authored
      The unit is KB, so sizeof(struct circular_queue) should be
      divided by 1024.
      Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
      Cc: akpm@linux-foundation.org
      Cc: torvalds@linux-foundation.org
      Cc: davem@davemloft.net
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: a.p.zijlstra@chello.nl
      LKML-Reference: <1249220616-7190-1-git-send-email-tom.leiming@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      90629209
    • Ming Lei's avatar
      lockdep: Reintroduce generation count to make BFS faster · e351b660
      Ming Lei authored
      We still can apply DaveM's generation count optimization to
      BFS, based on the following idea:
      
       - before doing each BFS, increase the global generation id
         by 1
      
       - if one node in the graph has been visited, mark it as
         visited by storing the current global generation id into
         the node's dep_gen_id field
      
       - so we can decide if one node has been visited already, by
         comparing the node's dep_gen_id with the global generation id.
      
      By applying DaveM's generation count optimization to current
      implementation of BFS, we gain the following advantages:
      
       - we save MAX_LOCKDEP_ENTRIES/8 bytes memory;
      
       - we remove the bitmap_zero(bfs_accessed, MAX_LOCKDEP_ENTRIES);
         in each BFS, which is very time-consuming since
         MAX_LOCKDEP_ENTRIES may be very large.(16384UL)
      Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: "David S. Miller" <davem@davemloft.net>
      LKML-Reference: <1248274089-6358-1-git-send-email-tom.leiming@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e351b660
    • Peter Zijlstra's avatar
      lockdep: Deal with many similar locks · bb97a91e
      Peter Zijlstra authored
      spin_lock_nest_lock() allows to take many instances of the same
      class, this can easily lead to overflow of MAX_LOCK_DEPTH.
      
      To avoid this overflow, we'll stop accounting instances but
      start reference counting the class in the held_lock structure.
      
      [ We could maintain a list of instances, if we'd move the hlock
        stuff into __lock_acquired(), but that would require
        significant modifications to the current code. ]
      
      We restrict this mode to spin_lock_nest_lock() only, because it
      degrades the lockdep quality due to lost of instance.
      
      For lockstat this means we don't track lock statistics for any
      but the first lock in the series.
      
      Currently nesting is limited to 11 bits because that was the
      spare space available in held_lock. This yields a 2048
      instances maximium.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bb97a91e
    • Peter Zijlstra's avatar
      lockdep: Introduce lockdep_assert_held() · f607c668
      Peter Zijlstra authored
      Add a lockdep helper to validate that we indeed are the owner
      of a lock.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f607c668
    • Peter Zijlstra's avatar
      lockdep: Fix style nits · 98c33edd
      Peter Zijlstra authored
      fixes a few comments and whitespaces that annoyed me.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      98c33edd
    • Peter Zijlstra's avatar
      lockdep: Fix backtraces · 4f84f433
      Peter Zijlstra authored
      Truncate stupid -1 entries in backtraces.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1248096665.15751.8816.camel@twins>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4f84f433
    • Ingo Molnar's avatar
      lockdep: Fix BFS build · bbfa2622
      Ingo Molnar authored
      Fix:
      
        kernel/built-in.o: In function `lockdep_stats_show':
        lockdep_proc.c:(.text+0x48202): undefined reference to `max_bfs_queue_depth'
      
      As max_bfs_queue_depth is only available under
      CONFIG_PROVE_LOCKING=y.
      
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bbfa2622
  3. 24 Jul, 2009 10 commits
  4. 23 Jul, 2009 1 commit
  5. 22 Jul, 2009 19 commits