linux-stable-rt/arch/powerpc
Masami Hiramatsu b4c6c34a53 [PATCH] kprobes: enable booster on the preemptible kernel
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: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:38 -08:00
..
boot [POWERPC] ps3: add a default zImage target 2006-12-05 11:28:17 +11:00
configs [POWERPC] Linkstation / kurobox support 2006-12-04 20:42:08 +11:00
kernel [PATCH] kprobes: enable booster on the preemptible kernel 2006-12-07 08:39:38 -08:00
lib [POWERPC] Disallow kprobes on emulate_step and branch_taken 2006-11-01 15:14:12 +11:00
math-emu
mm [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
oprofile [POWERPC] ps3: multiplatform build fixes 2006-12-04 20:41:16 +11:00
platforms [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
sysdev [POWERPC] Replace kmalloc+memset with kzalloc 2006-12-04 20:42:09 +11:00
xmon [POWERPC] Allow xmon to build on legacy iSeries 2006-12-04 20:41:56 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig [POWERPC] Remove obsolete PPC_52xx and update CLASSIC32 comment 2006-12-05 11:33:53 +11:00
Kconfig.debug [POWERPC] Allow CONFIG_BOOTX_TEXT on iSeries 2006-12-04 20:41:58 +11:00
Makefile