Skip to content

Commit

Permalink
thp: remove unnecessary khugepaged_thread check
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Xiao Guangrong authored and Linus Torvalds committed Oct 9, 2012
1 parent 911891a commit e060f0e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2333,11 +2333,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;
Expand Down

0 comments on commit e060f0e

Please sign in to comment.