diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-10-08 19:29:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:22:27 -0400 |
commit | b7231789b0224e73af4efc7973f8bcf17fc16edd (patch) | |
tree | bc4234109f650f88d650a02211ca721dde673506 /mm/huge_memory.c | |
parent | 26234f36ef3ec7efcfa9acb181427849c1f9db7c (diff) |
thp: remove khugepaged_loop
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index f0e999379dd7..77b470b7e3c6 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -2339,14 +2339,6 @@ static void khugepaged_wait_work(void) | |||
2339 | wait_event_freezable(khugepaged_wait, khugepaged_wait_event()); | 2339 | wait_event_freezable(khugepaged_wait, khugepaged_wait_event()); |
2340 | } | 2340 | } |
2341 | 2341 | ||
2342 | static void khugepaged_loop(void) | ||
2343 | { | ||
2344 | while (likely(khugepaged_enabled())) { | ||
2345 | khugepaged_do_scan(); | ||
2346 | khugepaged_wait_work(); | ||
2347 | } | ||
2348 | } | ||
2349 | |||
2350 | static int khugepaged(void *none) | 2342 | static int khugepaged(void *none) |
2351 | { | 2343 | { |
2352 | struct mm_slot *mm_slot; | 2344 | struct mm_slot *mm_slot; |
@@ -2354,8 +2346,10 @@ static int khugepaged(void *none) | |||
2354 | set_freezable(); | 2346 | set_freezable(); |
2355 | set_user_nice(current, 19); | 2347 | set_user_nice(current, 19); |
2356 | 2348 | ||
2357 | while (!kthread_should_stop()) | 2349 | while (!kthread_should_stop()) { |
2358 | khugepaged_loop(); | 2350 | khugepaged_do_scan(); |
2351 | khugepaged_wait_work(); | ||
2352 | } | ||
2359 | 2353 | ||
2360 | spin_lock(&khugepaged_mm_lock); | 2354 | spin_lock(&khugepaged_mm_lock); |
2361 | mm_slot = khugepaged_scan.mm_slot; | 2355 | mm_slot = khugepaged_scan.mm_slot; |