MIPS: fault.c: Port OOM changes to do_page_fault
authorKautuk Consul <consul.kautuk@gmail.com>
Fri, 23 Dec 2011 11:22:42 +0000 (16:52 +0530)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 20 Feb 2012 17:33:19 +0000 (18:33 +0100)
commit43ca4957a15a120d0822a60a22998dbb41bbf075
treee1bbcc60ca694168c1dbc2af187dc03d8b441abe
parent58a7fca67a9a6c7dccff727f16826f811ca59127
MIPS: fault.c: Port OOM changes to do_page_fault

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 MIPS.

Without these changes, my MIPS board encounters many hang and livelock
scenarios.
After applying this patch, OOM feature performance improves according to
my testing.

Signed-off-by: Mohd. Faris <mohdfarisq2010@gmail.com>
Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/3217/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/fault.c