From d7c668aed21615f5e036b1c14f50888af0d5aade Mon Sep 17 00:00:00 2001 From: Chris Wright <chrisw@redhat.com> Date: Mon, 1 Jun 2009 17:22:40 -0700 Subject: [PATCH 09/10] ksm: remove kprobes usage for rhel 5.4 (v3) Considering the fact that rhel 5.4 have mmu notifiers support, we dont need the kprobes to handle the notifications to kvm. Leaving the current code as it is - is not a bug, it is just matther of unneeded code that hurt the performence for rhel 5.4 when ksm is loaded (the copy on write performence) (Btw, i have faked here the signeture of Chris, hope he will forgive me :)) Thanks. Message-ID: <20090602002240.GL1494@x200.localdomain> Obsoletes: <1243894307-17932-2-git-send-email-ieidus@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> RH-Upstream-status: not-applicable Acked-by: Izik Eidus <ieidus@redhat.com> Bugzilla: 504237 Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Izik Eidus <ieidus@redhat.com> Message-Id: <1244142579-3405-2-git-send-email-ieidus@redhat.com> Acked-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: john cooper <john.cooper@redhat.com> --- kernel/ksm/Kbuild | 6 +++++- kernel/ksm/wp_notifier.h | 5 +++++ 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/kernel/ksm/Kbuild b/kernel/ksm/Kbuild index fe020e0..0276f4f 100644 --- a/kernel/ksm/Kbuild +++ b/kernel/ksm/Kbuild @@ -1,2 +1,6 @@ obj-m := ksm.o -ksm-objs := ksm_main.o wp_notifier.o +ksm-objs := ksm_main.o +ifeq ($(CONFIG_MMU_NOTIFIER),y) +else +ksm-objs += wp_notifier.o +endif diff --git a/kernel/ksm/wp_notifier.h b/kernel/ksm/wp_notifier.h index 3788e8c..23638b9 100644 --- a/kernel/ksm/wp_notifier.h +++ b/kernel/ksm/wp_notifier.h @@ -3,8 +3,13 @@ #include <linux/mm.h> +#ifndef CONFIG_MMU_NOTIFIER int init_wp_notifier(void); void exit_wp_notifier(void); +#else +static inline int init_wp_notifier(void) {return 0;} +static inline void exit_wp_notifier(void) {return;} +#endif void kvm_wp_notifier(struct mm_struct *mm, unsigned long address); -- 1.6.3.rc4.29.g8146