]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
thp: remove unnecessary khugepaged_thread check
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Wed, 26 Sep 2012 01:33:22 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 05:41:35 +0000 (15:41 +1000)
Now, khugepaged creation and cancel are completely serial under the
protection of khugepaged_mutex, it is impossible that many khugepaged
entities are running

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 0e5f6669fbdb6b6d7983fe2ef277c0df68798d72..d630ac5678d5afd0e9a8da5e70af4ac2e8827f95 100644 (file)
@@ -2351,11 +2351,8 @@ static int khugepaged(void *none)
        set_freezable();
        set_user_nice(current, 19);
 
-       while (!kthread_should_stop()) {
-               VM_BUG_ON(khugepaged_thread != current);
+       while (!kthread_should_stop())
                khugepaged_loop();
-               VM_BUG_ON(khugepaged_thread != current);
-       }
 
        spin_lock(&khugepaged_mm_lock);
        mm_slot = khugepaged_scan.mm_slot;