Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -840,7 +840,6 @@ repeat:
	ret = 0;
	if (drain) {
		lru_add_drain_all();
		flush_scheduled_work();
		cond_resched();
		drain_all_pages();
	}
@@ -862,7 +861,6 @@ repeat:
	}
	/* 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();