aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/fault.c
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2008-10-22 05:53:45 +0000
committerPaul Mackerras <paulus@samba.org>2008-11-05 22:08:28 +1100
commit409001948d9f221c94a61c3ee96de112755fc04d (patch)
tree2f49e6f0df22721f16e2a68baf94573a923bdda4 /arch/powerpc/mm/fault.c
parent1ef8014debb6410ed1960c4477d0006df11157c1 (diff)
downloadkernel_samsung_crespo-409001948d9f221c94a61c3ee96de112755fc04d.zip
kernel_samsung_crespo-409001948d9f221c94a61c3ee96de112755fc04d.tar.gz
kernel_samsung_crespo-409001948d9f221c94a61c3ee96de112755fc04d.tar.bz2
powerpc: Update page-in counter for CMM
A new field has been added to the VPA as a method for the client OS to communicate to firmware the number of page-ins it is performing when running collaborative memory overcommit. The hypervisor will use this information to better determine if a partition is experiencing memory pressure and needs more memory allocated to it. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r--arch/powerpc/mm/fault.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 565b7a2..b18bc0f 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -30,6 +30,7 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
+#include <asm/firmware.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mmu.h>
@@ -318,9 +319,16 @@ good_area:
goto do_sigbus;
BUG();
}
- if (ret & VM_FAULT_MAJOR)
+ if (ret & VM_FAULT_MAJOR) {
current->maj_flt++;
- else
+#ifdef CONFIG_PPC_SMLPAR
+ if (firmware_has_feature(FW_FEATURE_CMO)) {
+ preempt_disable();
+ get_lppaca()->page_ins++;
+ preempt_enable();
+ }
+#endif
+ } else
current->min_flt++;
up_read(&mm->mmap_sem);
return 0;