]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
thp: remove khugepaged_loop
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Wed, 26 Sep 2012 01:33:24 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 05:41:36 +0000 (15:41 +1000)
Merge khugepaged_loop into khugepaged

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index 67ea113414eb774bd21414f6594b420dabb002c2..e96c5f69cafc35499c9e16d64a2ddf3cb27c9fa2 100644 (file)
@@ -2357,14 +2357,6 @@ static void khugepaged_wait_work(void)
                wait_event_freezable(khugepaged_wait, khugepaged_wait_event());
 }
 
-static void khugepaged_loop(void)
-{
-       while (likely(khugepaged_enabled())) {
-               khugepaged_do_scan();
-               khugepaged_wait_work();
-       }
-}
-
 static int khugepaged(void *none)
 {
        struct mm_slot *mm_slot;
@@ -2372,8 +2364,10 @@ static int khugepaged(void *none)
        set_freezable();
        set_user_nice(current, 19);
 
-       while (!kthread_should_stop())
-               khugepaged_loop();
+       while (!kthread_should_stop()) {
+               khugepaged_do_scan();
+               khugepaged_wait_work();
+       }
 
        spin_lock(&khugepaged_mm_lock);
        mm_slot = khugepaged_scan.mm_slot;