]> git.baikalelectronics.ru Git - kernel.git/commit
thp: cleanup how khugepaged enters freezer
authorJiri Kosina <jkosina@suse.cz>
Wed, 24 Jun 2015 23:56:07 +0000 (16:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Jun 2015 00:49:41 +0000 (17:49 -0700)
commitcf13477d43a1e088b302a521669e0f24ef500a6b
tree49a000c9132efe3fb88a9d31214511f6f38dae3b
parent99cd7adbb1a4806d1d4744036f2101f4af75fc83
thp: cleanup how khugepaged enters freezer

khugepaged_do_scan() checks in every iteration whether freezing(current)
is true, and in such case breaks out of the loop, which causes
try_to_freeze() to be called immediately afterwards in
khugepaged_wait_work().

If nothing else, this causes unnecessary freezing(current) test, and also
makes the way khugepaged enters freezer a bit less obvious than necessary.

Let's just try to freeze directly, instead of splitting it into two
(directly adjacent) phases.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Mel Gorman <mgorman@suse.de>
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