Skip to content

Commit

Permalink
memory_hotplug: drop spurious calls to flush_scheduled_work()
Browse files Browse the repository at this point in the history
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: Tejun Heo <tj@kernel.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
  • Loading branch information
htejun committed Oct 19, 2010
1 parent e24dcbe commit 10ccd84
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,6 @@ static int offline_pages(unsigned long start_pfn,
ret = 0;
if (drain) {
lru_add_drain_all();
flush_scheduled_work();
cond_resched();
drain_all_pages();
}
Expand All @@ -862,7 +861,6 @@ static int offline_pages(unsigned long start_pfn,
}
/* drain all zone's lru pagevec, this is asyncronous... */
lru_add_drain_all();
flush_scheduled_work();
yield();
/* drain pcp pages , this is synchrouns. */
drain_all_pages();
Expand Down

0 comments on commit 10ccd84

Please sign in to comment.