aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorRobert Jennings <rcj@linux.vnet.ibm.com>2008-11-14 07:07:34 -0500
committerPaul Mackerras <paulus@samba.org>2008-11-19 00:05:05 -0500
commita6326e98a28d8a57f693369c82559543c6950f09 (patch)
treed26289b3ced079b0b175b3421f30e592252a3a19 /arch/powerpc
parent22059a90b82d6cd02d488c48c27a4d0ad976c919 (diff)
powerpc: Correct page-in counter for CMM with 64k pages
Linux will report the number of page-ins so that the hypervisor can better determine partition memory pressure. The hardware page size and the OS page size can be different. In the case where the hardware page size is 4k and the OS is running with 64k pages the code in commit 409001948d9f221c94a61c3ee96de112755fc04d ("powerpc: Update page-in counter for CMM") would under-report the number of pages. This corrects the reporting to the hypervisor by incrementing the page_in count by 1 << PAGE_FACTOR each time. Reported-by: Andrew Theurer <habanero@linux.vnet.ibm.com> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/fault.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index b18bc0f023c8..7df0409107ad 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -324,7 +324,7 @@ good_area:
324#ifdef CONFIG_PPC_SMLPAR 324#ifdef CONFIG_PPC_SMLPAR
325 if (firmware_has_feature(FW_FEATURE_CMO)) { 325 if (firmware_has_feature(FW_FEATURE_CMO)) {
326 preempt_disable(); 326 preempt_disable();
327 get_lppaca()->page_ins++; 327 get_lppaca()->page_ins += (1 << PAGE_FACTOR);
328 preempt_enable(); 328 preempt_enable();
329 } 329 }
330#endif 330#endif