aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/huge_memory.c14
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
2342static void khugepaged_loop(void)
2343{
2344 while (likely(khugepaged_enabled())) {
2345 khugepaged_do_scan();
2346 khugepaged_wait_work();
2347 }
2348}
2349
2350static int khugepaged(void *none) 2342static 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;