b4c6c34a53
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> |
||
---|---|---|
.. | ||
asm-offsets.c | ||
audit.c | ||
binfmt_elf32.c | ||
bitmap.S | ||
compat_audit.c | ||
compat_exec_domain.c | ||
compat_linux.c | ||
compat_linux.h | ||
compat_ptrace.h | ||
compat_signal.c | ||
compat_wrapper.S | ||
cpcmd.c | ||
crash.c | ||
debug.c | ||
ebcdic.c | ||
entry64.S | ||
entry.S | ||
head31.S | ||
head64.S | ||
head.S | ||
init_task.c | ||
ipl.c | ||
irq.c | ||
kprobes.c | ||
machine_kexec.c | ||
Makefile | ||
module.c | ||
process.c | ||
profile.c | ||
ptrace.c | ||
reipl64.S | ||
reipl.S | ||
relocate_kernel64.S | ||
relocate_kernel.S | ||
reset.S | ||
s390_ext.c | ||
s390_ksyms.c | ||
semaphore.c | ||
setup.c | ||
signal.c | ||
smp.c | ||
stacktrace.c | ||
sys_s390.c | ||
syscalls.S | ||
time.c | ||
traps.c | ||
vmlinux.lds.S | ||
vtime.c |