linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Correct page-in counter for CMM
@ 2008-11-14 22:07 Robert Jennings
  0 siblings, 0 replies; only message in thread
From: Robert Jennings @ 2008-11-14 22:07 UTC (permalink / raw)
  To: paulus; +Cc: Brian King, linuxppc-dev, Andrew Theurer

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 prior patch would
under-report the number of pages. This patch uses PAGE_FACTOR to correct
the reporting to the hypervisor.

Reported-by: Andrew Theurer <habanero@linux.vnet.ibm.com>
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>

---
 arch/powerpc/mm/fault.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/arch/powerpc/mm/fault.c
===================================================================
--- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-14 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-14 22:07 [PATCH] powerpc: Correct page-in counter for CMM Robert Jennings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).