]> git.karo-electronics.de Git - karo-tx-linux.git/commit
thp: reduce khugepaged freezing latency
authorAndrea Arcangeli <aarcange@redhat.com>
Wed, 16 Nov 2011 23:41:28 +0000 (10:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 23 Nov 2011 03:04:45 +0000 (14:04 +1100)
commitd626b962c42b2e0d73b458f84c7cad0555fe6af2
treef54a1eeb80541a823f1075be7f1c5918ded0344d
parent202f328ff0d0b9f5c9f2f3a6d908e9b0bc24ec95
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