From: Robert Jennings Date: Fri, 14 Nov 2008 12:07:34 +0000 (+0000) Subject: powerpc: Correct page-in counter for CMM with 64k pages X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a6326e98a28d8a57f693369c82559543c6950f09;p=mv-sheeva.git 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 Signed-off-by: Robert Jennings Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index b18bc0f023c..7df0409107a 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -324,7 +324,7 @@ good_area: #ifdef CONFIG_PPC_SMLPAR if (firmware_has_feature(FW_FEATURE_CMO)) { preempt_disable(); - get_lppaca()->page_ins++; + get_lppaca()->page_ins += (1 << PAGE_FACTOR); preempt_enable(); } #endif