[PATCH] ARM: 7178/1: fault.c: Port OOM changes into do_page_fault
Seth Forshee
seth.forshee at canonical.com
Wed May 2 14:20:52 UTC 2012
On Wed, May 02, 2012 at 11:16:23AM +0200, Paolo Pisati wrote:
> From: Kautuk Consul <consul.kautuk at gmail.com>
>
> Commit d065bd810b6deb67d4897a14bfe21f8eb526ba99
> (mm: retry page fault when blocking on disk transfer) and
> commit 37b23e0525d393d48a7d59f870b3bc061a30ccdb
> (x86,mm: make pagefault killable)
>
> The above commits introduced changes into the x86 pagefault handler
> for making the page fault handler retryable as well as killable.
>
> These changes reduce the mmap_sem hold time, which is crucial
> during OOM killer invocation.
>
> Port these changes to ARM.
>
> Without these changes, my ARM board encounters many hang and livelock
> scenarios.
> After applying this patch, OOM feature performance improves according to
> my testing.
>
> Signed-off-by: Kautuk Consul <consul.kautuk at gmail.com>
> Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
>
> BugLink: http://launchpad.net/bugs/951043
>
> Signed-off-by: Ike Panhc <ike.pan at canonical.com>
> (cherry picked from commit 03bc9403d0712d8b2cc6b54d0aa0cfad2144b8bd)
I would have thought that the preference would be to cherry pick the
original commit, but if there's a good reason to get it from a different
tree you should probably at least note what tree it came from, because
otherwise the sha-1 is meaningless.
Looking at Linus's tree, I also see the following, which looks like it
fixes a bug in page fault accounting introduced by this patch. Should we
pick it up as well?
commit dff2aa7af8c96a11f75d858859f0e0c78b193d12
Author: Kautuk Consul <consul.kautuk at gmail.com>
Date: Mon Apr 2 18:19:49 2012 +0100
ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incremented
commit 8878a539ff19a43cf3729e7562cd528f490246ae was done by me
to make the page fault handler retryable as well as interruptible.
Due to this commit, there is a mistake in the way in which
tsk->[maj|min]_flt counter gets incremented for VM_FAULT_ERROR:
If VM_FAULT_ERROR is returned in the fault flags by handle_mm_fault,
then either maj_flt or min_flt will get incremented. This is wrong
as in the case of a VM_FAULT_ERROR we need to be skip ahead to the
error handling code in do_page_fault.
Added a check after the call to __do_page_fault() to check for
(fault & VM_FAULT_ERROR).
More information about the kernel-team
mailing list