kernel-ark/arch
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
..
alpha [PATCH] alpha: switch to pci_get API 2006-12-07 08:39:26 -08:00
arm [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
arm26 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
avr32 [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
cris [PATCH] mm: arch do_page_fault() vs in_atomic() 2006-12-07 08:39:21 -08:00
frv [PATCH] initrd: remove unused false condition for initrd_start 2006-12-07 08:39:38 -08:00
h8300 [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
i386 [PATCH] kprobes: enable booster on the preemptible kernel 2006-12-07 08:39:38 -08:00
ia64 [PATCH] kprobes: enable booster on the preemptible kernel 2006-12-07 08:39:38 -08:00
m32r [PATCH] initrd: remove unused false condition for initrd_start 2006-12-07 08:39:38 -08:00
m68k [PATCH] m68k: replace kmalloc+memset with kzalloc 2006-12-07 08:39:29 -08:00
m68knommu [PATCH] m68knommu: switch 68360 to using rtc_time 2006-12-06 07:41:26 -08:00
mips [PATCH] elf: include terminating zero in n_namesz 2006-12-07 08:39:38 -08:00
parisc [PATCH] elf: Always define elf_addr_t in linux/elf.h 2006-12-07 08:39:38 -08:00
powerpc [PATCH] kprobes: enable booster on the preemptible kernel 2006-12-07 08:39:38 -08:00
ppc WorkQueue: Fix up arch-specific work items where possible 2006-12-05 19:36:26 +00:00
s390 [PATCH] kprobes: enable booster on the preemptible kernel 2006-12-07 08:39:38 -08:00
sh [PATCH] initrd: remove unused false condition for initrd_start 2006-12-07 08:39:38 -08:00
sh64 [PATCH] initrd: remove unused false condition for initrd_start 2006-12-07 08:39:38 -08:00
sparc [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
sparc64 [PATCH] elf: Always define elf_addr_t in linux/elf.h 2006-12-07 08:39:38 -08:00
um [PATCH] uml: use get_random_bytes() after random pool is seeded 2006-12-07 08:39:29 -08:00
v850 [NET]: V850 checksum annotations and cleanups. 2006-12-02 21:23:13 -08:00
x86_64 [PATCH] kprobes: enable booster on the preemptible kernel 2006-12-07 08:39:38 -08:00
xtensa