1. 17 1月, 2009 1 次提交
  2. 07 1月, 2009 6 次提交
  3. 13 11月, 2008 2 次提交
  4. 17 10月, 2008 1 次提交
  5. 26 7月, 2008 2 次提交
    • A
      kprobes: remove redundant config check · 8b6dd986
      Abhishek Sagar 提交于
      I noticed that there's a CONFIG_KPROBES check inside kernel/kprobes.c,
      which is redundant.
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Acked-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8b6dd986
    • S
      kprobes: improve kretprobe scalability with hashed locking · ef53d9c5
      Srinivasa D S 提交于
      Currently list of kretprobe instances are stored in kretprobe object (as
      used_instances,free_instances) and in kretprobe hash table.  We have one
      global kretprobe lock to serialise the access to these lists.  This causes
      only one kretprobe handler to execute at a time.  Hence affects system
      performance, particularly on SMP systems and when return probe is set on
      lot of functions (like on all systemcalls).
      
      Solution proposed here gives fine-grain locks that performs better on SMP
      system compared to present kretprobe implementation.
      
      Solution:
      
       1) Instead of having one global lock to protect kretprobe instances
          present in kretprobe object and kretprobe hash table.  We will have
          two locks, one lock for protecting kretprobe hash table and another
          lock for kretporbe object.
      
       2) We hold lock present in kretprobe object while we modify kretprobe
          instance in kretprobe object and we hold per-hash-list lock while
          modifying kretprobe instances present in that hash list.  To prevent
          deadlock, we never grab a per-hash-list lock while holding a kretprobe
          lock.
      
       3) We can remove used_instances from struct kretprobe, as we can
          track used instances of kretprobe instances using kretprobe hash
          table.
      
      Time duration for kernel compilation ("make -j 8") on a 8-way ppc64 system
      with return probes set on all systemcalls looks like this.
      
      cacheline              non-cacheline             Un-patched kernel
      aligned patch 	       aligned patch
      ===============================================================================
      real    9m46.784s       9m54.412s                  10m2.450s
      user    40m5.715s       40m7.142s                  40m4.273s
      sys     2m57.754s       2m58.583s                  3m17.430s
      ===========================================================
      
      Time duration for kernel compilation ("make -j 8) on the same system, when
      kernel is not probed.
      =========================
      real    9m26.389s
      user    40m8.775s
      sys     2m7.283s
      =========================
      Signed-off-by: NSrinivasa DS <srinivasa@in.ibm.com>
      Signed-off-by: NJim Keniston <jkenisto@us.ibm.com>
      Acked-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ef53d9c5
  6. 11 7月, 2008 1 次提交
  7. 13 6月, 2008 1 次提交
  8. 28 4月, 2008 4 次提交
  9. 05 3月, 2008 2 次提交
  10. 07 2月, 2008 1 次提交
  11. 30 1月, 2008 1 次提交
  12. 17 10月, 2007 2 次提交
  13. 12 8月, 2007 1 次提交
    • P
      fix compilation with gcc 4.2 · cd5bfea2
      Peter Chubb 提交于
      gcc-4.2 is a lot more picky about its symbol handling.  EXPORT_SYMBOL no
      longer works on symbols that are undefined or defined with static scope.
      
      For example, with CONFIG_PROFILE off, I see:
      
        kernel/profile.c:206: error: __ksymtab_profile_event_unregister causes a section type conflict
        kernel/profile.c:205: error: __ksymtab_profile_event_register causes a section type conflict
      
      This patch moves the EXPORTs inside the #ifdef CONFIG_PROFILE, so we
      only try to export symbols that are defined.
      
      Also, in kernel/kprobes.c there's an EXPORT_SYMBOL_GPL() for
      jprobes_return, which if CONFIG_JPROBES is undefined is a static
      inline and gives the same error.
      
      And in drivers/acpi/resources/rsxface.c, there's an
      ACPI_EXPORT_SYMBOPL() for a static symbol. If it's static, it's not
      accessible from outside the compilation unit, so should bot be exported.
      
      These three changes allow building a zx1_defconfig kernel with gcc 4.2
      on IA64.
      
      [akpm@linux-foundation.org: export jpobe_return properly]
      Signed-off-by: NPeter Chubb <peterc@gelato.unsw.edu.au>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd5bfea2
  14. 20 7月, 2007 1 次提交
  15. 09 5月, 2007 7 次提交
  16. 21 2月, 2007 1 次提交
    • S
      [PATCH] kprobes: list all active probes in the system · 346fd59b
      Srinivasa Ds 提交于
      This patch lists all active probes in the system by scanning through
      kprobe_table[].  It takes care of aggregate handlers and prints the type of
      the probe.  Letter "k" for kprobes, "j" for jprobes, "r" for kretprobes.
      It also lists address of the instruction,its symbolic name(function name +
      offset) and the module name.  One can access this file through
      /sys/kernel/debug/kprobes/list.
      
      Output looks like this
      =====================
      llm40:~/a # cat /sys/kernel/debug/kprobes/list
      c0169ae3  r  sys_read+0x0
      c0169ae3  k  sys_read+0x0
      c01694c8  k  vfs_write+0x0
      c0167d20  r  sys_open+0x0
      f8e658a6  k  reiserfs_delete_inode+0x0  reiserfs
      c0120f4a  k  do_fork+0x0
      c0120f4a  j  do_fork+0x0
      c0169b4a  r  sys_write+0x0
      c0169b4a  k  sys_write+0x0
      c0169622  r  vfs_read+0x0
      =================================
      
      [akpm@linux-foundation.org: cleanup]
      [ananth@in.ibm.com: sparc build fix]
      Signed-off-by: NSrinivasa DS <srinivasa@in.ibm.com>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      346fd59b
  17. 31 1月, 2007 1 次提交
  18. 08 12月, 2006 1 次提交
    • M
      [PATCH] kprobes: enable booster on the preemptible kernel · b4c6c34a
      Masami Hiramatsu 提交于
      When we are unregistering a kprobe-booster, we can't release its
      instruction buffer immediately on the preemptive kernel, because some
      processes might be preempted on the buffer.  The freeze_processes() and
      thaw_processes() functions can clean most of processes up from the buffer.
      There are still some non-frozen threads who have the PF_NOFREEZE flag.  If
      those threads are sleeping (not preempted) at the known place outside the
      buffer, we can ensure safety of freeing.
      
      However, the processing of this check routine takes a long time.  So, this
      patch introduces the garbage collection mechanism of insn_slot.  It also
      introduces the "dirty" flag to free_insn_slot because of efficiency.
      
      The "clean" instruction slots (dirty flag is cleared) are released
      immediately.  But the "dirty" slots which are used by boosted kprobes, are
      marked as garbages.  collect_garbage_slots() will be invoked to release
      "dirty" slots if there are more than INSNS_PER_PAGE garbage slots or if
      there are no unused slots.
      
      Cc: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: "bibo,mao" <bibo.mao@intel.com>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Cc: Yumiko Sugita <yumiko.sugita.yf@hitachi.com>
      Cc: Satoshi Oshima <soshima@redhat.com>
      Cc: Hideo Aoki <haoki@redhat.com>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b4c6c34a
  19. 02 10月, 2006 3 次提交
  20. 01 8月, 2006 1 次提交