1. 08 10月, 2007 1 次提交
  2. 25 9月, 2007 1 次提交
  3. 01 8月, 2007 1 次提交
  4. 20 7月, 2007 1 次提交
    • P
      lockstat: core infrastructure · f20786ff
      Peter Zijlstra 提交于
      Introduce the core lock statistics code.
      
      Lock statistics provides lock wait-time and hold-time (as well as the count
      of corresponding contention and acquisitions events). Also, the first few
      call-sites that encounter contention are tracked.
      
      Lock wait-time is the time spent waiting on the lock. This provides insight
      into the locking scheme, that is, a heavily contended lock is indicative of
      a too coarse locking scheme.
      
      Lock hold-time is the duration the lock was held, this provides a reference for
      the wait-time numbers, so they can be put into perspective.
      
        1)
          lock
        2)
          ... do stuff ..
          unlock
        3)
      
      The time between 1 and 2 is the wait-time. The time between 2 and 3 is the
      hold-time.
      
      The lockdep held-lock tracking code is reused, because it already collects locks
      into meaningful groups (classes), and because it is an existing infrastructure
      for lock instrumentation.
      
      Currently lockdep tracks lock acquisition with two hooks:
      
        lock()
          lock_acquire()
          _lock()
      
       ... code protected by lock ...
      
        unlock()
          lock_release()
          _unlock()
      
      We need to extend this with two more hooks, in order to measure contention.
      
        lock_contended() - used to measure contention events
        lock_acquired()  - completion of the contention
      
      These are then placed the following way:
      
        lock()
          lock_acquire()
          if (!_try_lock())
            lock_contended()
            _lock()
            lock_acquired()
      
       ... do locked stuff ...
      
        unlock()
          lock_release()
          _unlock()
      
      (Note: the try_lock() 'trick' is used to avoid instrumenting all platform
             dependent lock primitive implementations.)
      
      It is also possible to toggle the two lockdep features at runtime using:
      
        /proc/sys/kernel/prove_locking
        /proc/sys/kernel/lock_stat
      
      (esp. turning off the O(n^2) prove_locking functionaliy can help)
      
      [akpm@linux-foundation.org: build fixes]
      [akpm@linux-foundation.org: nuke unneeded ifdefs]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f20786ff
  5. 17 7月, 2007 1 次提交
  6. 10 7月, 2007 1 次提交
  7. 01 6月, 2007 1 次提交
  8. 24 5月, 2007 1 次提交
  9. 13 5月, 2007 1 次提交
  10. 09 5月, 2007 2 次提交
  11. 08 5月, 2007 1 次提交
  12. 03 5月, 2007 1 次提交
  13. 27 4月, 2007 1 次提交
  14. 21 2月, 2007 1 次提交
  15. 17 2月, 2007 1 次提交
    • I
      [PATCH] Add debugging feature /proc/timer_stat · 82f67cd9
      Ingo Molnar 提交于
      Add /proc/timer_stats support: debugging feature to profile timer expiration.
      Both the starting site, process/PID and the expiration function is captured.
      This allows the quick identification of timer event sources in a system.
      
      Sample output:
      
      # echo 1 > /proc/timer_stats
      # cat /proc/timer_stats
      Timer Stats Version: v0.1
      Sample period: 4.010 s
        24,     0 swapper          hrtimer_stop_sched_tick (hrtimer_sched_tick)
        11,     0 swapper          sk_reset_timer (tcp_delack_timer)
         6,     0 swapper          hrtimer_stop_sched_tick (hrtimer_sched_tick)
         2,     1 swapper          queue_delayed_work_on (delayed_work_timer_fn)
        17,     0 swapper          hrtimer_restart_sched_tick (hrtimer_sched_tick)
         2,     1 swapper          queue_delayed_work_on (delayed_work_timer_fn)
         4,  2050 pcscd            do_nanosleep (hrtimer_wakeup)
         5,  4179 sshd             sk_reset_timer (tcp_write_timer)
         4,  2248 yum-updatesd     schedule_timeout (process_timeout)
        18,     0 swapper          hrtimer_restart_sched_tick (hrtimer_sched_tick)
         3,     0 swapper          sk_reset_timer (tcp_delack_timer)
         1,     1 swapper          neigh_table_init_no_netlink (neigh_periodic_timer)
         2,     1 swapper          e1000_up (e1000_watchdog)
         1,     1 init             schedule_timeout (process_timeout)
      100 total events, 25.24 events/sec
      
      [ cleanups and hrtimers support from Thomas Gleixner <tglx@linutronix.de> ]
      [bunk@stusta.de: nr_entries can become static]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      82f67cd9
  16. 13 2月, 2007 1 次提交
  17. 12 2月, 2007 1 次提交
  18. 16 12月, 2006 1 次提交
    • L
      Remove stack unwinder for now · d1526e2c
      Linus Torvalds 提交于
      It has caused more problems than it ever really solved, and is
      apparently not getting cleaned up and fixed.  We can put it back when
      it's stable and isn't likely to make warning or bug events worse.
      
      In the meantime, enable frame pointers for more readable stack traces.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d1526e2c
  19. 13 12月, 2006 1 次提交
  20. 11 12月, 2006 1 次提交
  21. 09 12月, 2006 9 次提交
    • A
      [PATCH] fault-injection: stacktrace filtering kconfig fix · 83ba2546
      Andrew Morton 提交于
      `select' doesn't work very well.  With alpha `make allmodconfig' we end up
      with CONFIG_STACKTRACE enabled, so we end up with undefined save_stacktrace()
      at link time.
      
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Cc: Don Mullis <dwm@meer.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      83ba2546
    • A
      [PATCH] fault-injection Kconfig cleanup · 1ab8509a
      Andrew Morton 提交于
      - Fix some spelling and grammatical errors
      
      - Make the Kconfig menu more conventional.  First you select
        fault-injection, then under that you select particular clients of it.
      
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Cc: Don Mullis <dwm@meer.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1ab8509a
    • A
      [PATCH] fault injection: stacktrace filtering · 329409ae
      Akinobu Mita 提交于
      This patch provides stacktrace filtering feature.
      
      The stacktrace filter allows failing only for the caller you are
      interested in.
      
      For example someone may want to inject kmalloc() failures into
      only e100 module. they want to inject not only direct kmalloc() call,
      but also indirect allocation, too.
      
      - e100_poll --> netif_receive_skb --> packet_rcv_spkt --> skb_clone
        --> kmem_cache_alloc
      
      This patch enables to detect function calls like this by stacktrace
      and inject failures. The script Documentaion/fault-injection/failmodule.sh
      helps it.
      
      The range of text section of loaded e100 is expected to be
      [/sys/module/e100/sections/.text, /sys/module/e100/sections/.exit.text)
      
      So failmodule.sh stores these values into /debug/failslab/address-start
      and /debug/failslab/address-end. The maximum stacktrace depth is specified
      by /debug/failslab/stacktrace-depth.
      
      Please see the example that demonstrates how to inject slab allocation
      failures only for a specific module
      in Documentation/fault-injection/fault-injection.txt
      
      [dwm@meer.net: reject failure if any caller lies within specified range]
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NDon Mullis <dwm@meer.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      329409ae
    • A
      [PATCH] fault-injection capability for disk IO · c17bb495
      Akinobu Mita 提交于
      This patch provides fault-injection capability for disk IO.
      
      Boot option:
      
      fail_make_request=<probability>,<interval>,<space>,<times>
      
      	<interval> -- specifies the interval of failures.
      
      	<probability> -- specifies how often it should fail in percent.
      
      	<space> -- specifies the size of free space where disk IO can be issued
      		   safely in bytes.
      
      	<times> -- specifies how many times failures may happen at most.
      
      Debugfs:
      
      /debug/fail_make_request/interval
      /debug/fail_make_request/probability
      /debug/fail_make_request/specifies
      /debug/fail_make_request/times
      
      Example:
      
      	fail_make_request=10,100,0,-1
      	echo 1 > /sys/blocks/hda/hda1/make-it-fail
      
      generic_make_request() on /dev/hda1 fails once per 10 times.
      
      Cc: Jens Axboe <axboe@suse.de>
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c17bb495
    • A
      [PATCH] fault-injection capability for alloc_pages() · 933e312e
      Akinobu Mita 提交于
      This patch provides fault-injection capability for alloc_pages()
      
      Boot option:
      
      fail_page_alloc=<interval>,<probability>,<space>,<times>
      
      	<interval> -- specifies the interval of failures.
      
      	<probability> -- specifies how often it should fail in percent.
      
      	<space> -- specifies the size of free space where memory can be
      		   allocated safely in pages.
      
      	<times> -- specifies how many times failures may happen at most.
      
      Debugfs:
      
      /debug/fail_page_alloc/interval
      /debug/fail_page_alloc/probability
      /debug/fail_page_alloc/specifies
      /debug/fail_page_alloc/times
      /debug/fail_page_alloc/ignore-gfp-highmem
      /debug/fail_page_alloc/ignore-gfp-wait
      
      Example:
      
      	fail_page_alloc=10,100,0,-1
      
      The page allocation (alloc_pages(), ...) fails once per 10 times.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      933e312e
    • A
      [PATCH] fault-injection capability for kmalloc · 8a8b6502
      Akinobu Mita 提交于
      This patch provides fault-injection capability for kmalloc.
      
      Boot option:
      
      failslab=<interval>,<probability>,<space>,<times>
      
      	<interval> -- specifies the interval of failures.
      
      	<probability> -- specifies how often it should fail in percent.
      
      	<space> -- specifies the size of free space where memory can be
      		   allocated safely in bytes.
      
      	<times> -- specifies how many times failures may happen at most.
      
      Debugfs:
      
      /debug/failslab/interval
      /debug/failslab/probability
      /debug/failslab/specifies
      /debug/failslab/times
      /debug/failslab/ignore-gfp-highmem
      /debug/failslab/ignore-gfp-wait
      
      Example:
      
      	failslab=10,100,0,-1
      
      slab allocation (kmalloc(), kmem_cache_alloc(),..) fails once per 10 times.
      
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8a8b6502
    • A
      [PATCH] fault-injection capabilities infrastructure · 6ff1cb35
      Akinobu Mita 提交于
      This patch provides base functions implement to fault-injection
      capabilities.
      
      - The function should_fail() is taken from failmalloc-1.0
        (http://www.nongnu.org/failmalloc/)
      
      [akpm@osdl.org: cleanups, comments, add __init]
      Cc: <okuji@enbug.org>
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NDon Mullis <dwm@meer.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6ff1cb35
    • J
      [PATCH] Generic BUG for i386 · 91768d6c
      Jeremy Fitzhardinge 提交于
      This makes i386 use the generic BUG machinery.  There are no functional
      changes from the old i386 implementation.
      
      The main advantage in using the generic BUG machinery for i386 is that the
      inlined overhead of BUG is just the ud2a instruction; the file+line(+function)
      information are no longer inlined into the instruction stream.  This reduces
      cache pollution, and makes disassembly work properly.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Hugh Dickens <hugh@veritas.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      91768d6c
    • J
      [PATCH] Generic BUG implementation · 7664c5a1
      Jeremy Fitzhardinge 提交于
      This patch adds common handling for kernel BUGs, for use by architectures as
      they wish.  The code is derived from arch/powerpc.
      
      The advantages of having common BUG handling are:
       - consistent BUG reporting across architectures
       - shared implementation of out-of-line file/line data
       - implement CONFIG_DEBUG_BUGVERBOSE consistently
      
      This means that in inline impact of BUG is just the illegal instruction
      itself, which is an improvement for i386 and x86-64.
      
      A BUG is represented in the instruction stream as an illegal instruction,
      which has file/line information associated with it.  This extra information is
      stored in the __bug_table section in the ELF file.
      
      When the kernel gets an illegal instruction, it first confirms it might
      possibly be from a BUG (ie, in kernel mode, the right illegal instruction).
      It then calls report_bug().  This searches __bug_table for a matching
      instruction pointer, and if found, prints the corresponding file/line
      information.  If report_bug() determines that it wasn't a BUG which caused the
      trap, it returns BUG_TRAP_TYPE_NONE.
      
      Some architectures (powerpc) implement WARN using the same mechanism; if the
      illegal instruction was the result of a WARN, then report_bug(Q) returns
      CONFIG_DEBUG_BUGVERBOSE; otherwise it returns BUG_TRAP_TYPE_BUG.
      
      lib/bug.c keeps a list of loaded modules which can be searched for __bug_table
      entries.  The architecture must call
      module_bug_finalize()/module_bug_cleanup() from its corresponding
      module_finalize/cleanup functions.
      
      Unsetting CONFIG_DEBUG_BUGVERBOSE will reduce the kernel size by some amount.
      At the very least, filename and line information will not be recorded for each
      but, but architectures may decide to store no extra information per BUG at
      all.
      
      Unfortunately, gcc doesn't have a general way to mark an asm() as noreturn, so
      architectures will generally have to include an infinite loop (or similar) in
      the BUG code, so that gcc knows execution won't continue beyond that point.
      gcc does have a __builtin_trap() operator which may be useful to achieve the
      same effect, unfortunately it cannot be used to actually implement the BUG
      itself, because there's no way to get the instruction's address for use in
      generating the __bug_table entry.
      
      [randy.dunlap@oracle.com: Handle BUG=n, GENERIC_BUG=n to prevent build errors]
      [bunk@stusta.de: include/linux/bug.h must always #include <linux/module.h]
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Hugh Dickens <hugh@veritas.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7664c5a1
  22. 08 12月, 2006 1 次提交
  23. 28 10月, 2006 1 次提交
  24. 13 10月, 2006 1 次提交
  25. 12 10月, 2006 2 次提交
  26. 02 10月, 2006 1 次提交
    • A
      [PATCH] Linux Kernel Dump Test Module · 8bb31b9d
      Ankita Garg 提交于
      A simple module to test Linux Kernel Dump mechanism.  This module uses
      jprobes to install/activate pre-defined crash points.  At different crash
      points, various types of crashing scenarios are created like a BUG(),
      panic(), exception, recursive loop and stack overflow.  The user can
      activate a crash point with specific type by providing parameters at the
      time of module insertion.  Please see the file header for usage
      information.  The module is based on the Linux Kernel Dump Test Tool by
      Fernando <http://lkdtt.sourceforge.net>.
      
      This module could be merged with mainline. Jprobes is used here so that the
      context in which crash point is hit, could be maintained. This implements
      all the crash points as done by LKDTT except the one in the middle of
      tasklet_action().
      Signed-off-by: NAnkita Garg <ankita@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8bb31b9d
  27. 30 9月, 2006 1 次提交
  28. 27 9月, 2006 2 次提交
  29. 26 9月, 2006 1 次提交