Skip to content

Commit

Permalink
powerpc: Correct page-in counter for CMM with 64k pages
Browse files Browse the repository at this point in the history
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 4090019 ("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>
  • Loading branch information
Robert Jennings authored and Paul Mackerras committed Nov 19, 2008
1 parent 22059a9 commit a6326e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
#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
Expand Down

0 comments on commit a6326e9

Please sign in to comment.