]> git.baikalelectronics.ru Git - kernel.git/commit
thp: do not adjust zone water marks if khugepaged is not started
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Wed, 15 Apr 2015 23:14:23 +0000 (16:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 Apr 2015 23:35:19 +0000 (16:35 -0700)
commit4a7d7519157b70c11d1f7951e9469f50507f7c26
tree71843a088245b34c908a143f943fe5d924bd9706
parent13f7171de695c553d25a97d9a26c1e94e45385f5
thp: do not adjust zone water marks if khugepaged is not started

set_recommended_min_free_kbytes() adjusts zone water marks to be suitable
for khugepaged. We avoid doing this if khugepaged is disabled, but don't
catch the case when khugepaged is failed to start.

Let's address this by checking khugepaged_thread instead of
khugepaged_enabled() in set_recommended_min_free_kbytes().
It's NULL if the kernel thread is stopped or failed to start.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c