]> git.karo-electronics.de Git - karo-tx-linux.git/commit
thp: reduce khugepaged freezing latency
authorAndrea Arcangeli <aarcange@redhat.com>
Fri, 2 Dec 2011 03:06:48 +0000 (14:06 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Dec 2011 03:50:59 +0000 (14:50 +1100)
commit78daf80bdbcaea2e2c65462d6f374421e002cac2
tree9126c818706f0491bac906b4534bc2770a6d8be5
parent9f9fc608065552ece964d4e43c7120ef1776792d
thp: reduce khugepaged freezing latency

Use wait_event_freezable_timeout() instead of
schedule_timeout_interruptible() to avoid missing freezer wakeups.  A
try_to_freeze() would have been needed in the khugepaged_alloc_hugepage
tight loop too in case of the allocation failing repeatedly, and
wait_event_freezable_timeout will provide it too.

khugepaged would still freeze just fine by trying again the next minute
but it's better if it freezes immediately.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Tested-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: "Rafael J. Wysocki" <rjw@suse.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c