Commit 10ccd846 authored by Tejun Heo's avatar Tejun Heo

memory_hotplug: drop spurious calls to flush_scheduled_work()

lru_add_drain_all() uses schedule_on_each_cpu() which is synchronous.
There is no reason to call flush_scheduled_work() after
lru_add_drain_all().  Drop the spurious calls.

This is to prepare for the deprecation and removal of
flush_scheduled_work().
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Acked-by: default avatarMel Gorman <mel@csn.ul.ie>
parent e24dcbef
...@@ -840,7 +840,6 @@ static int offline_pages(unsigned long start_pfn, ...@@ -840,7 +840,6 @@ static int offline_pages(unsigned long start_pfn,
ret = 0; ret = 0;
if (drain) { if (drain) {
lru_add_drain_all(); lru_add_drain_all();
flush_scheduled_work();
cond_resched(); cond_resched();
drain_all_pages(); drain_all_pages();
} }
...@@ -862,7 +861,6 @@ static int offline_pages(unsigned long start_pfn, ...@@ -862,7 +861,6 @@ static int offline_pages(unsigned long start_pfn,
} }
/* drain all zone's lru pagevec, this is asyncronous... */ /* drain all zone's lru pagevec, this is asyncronous... */
lru_add_drain_all(); lru_add_drain_all();
flush_scheduled_work();
yield(); yield();
/* drain pcp pages , this is synchrouns. */ /* drain pcp pages , this is synchrouns. */
drain_all_pages(); drain_all_pages();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment