linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2.6.36-rc7] memory_hotplug: drop spurious calls to flush_scheduled_work()
@ 2010-10-15 15:25 Tejun Heo
  2010-10-18  0:01 ` KAMEZAWA Hiroyuki
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tejun Heo @ 2010-10-15 15:25 UTC (permalink / raw)
  To: lkml, KAMEZAWA Hiroyuki, Andrew Morton, Mel Gorman, Wu Fengguang,
	Michal Hocko

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>
---
 mm/memory_hotplug.c |    2 --
 1 file changed, 2 deletions(-)

Index: work/mm/memory_hotplug.c
===================================================================
--- work.orig/mm/memory_hotplug.c
+++ work/mm/memory_hotplug.c
@@ -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();

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-10-20  0:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-15 15:25 [PATCH v2.6.36-rc7] memory_hotplug: drop spurious calls to flush_scheduled_work() Tejun Heo
2010-10-18  0:01 ` KAMEZAWA Hiroyuki
2010-10-18  5:03   ` Tejun Heo
2010-10-18 23:58     ` KAMEZAWA Hiroyuki
2010-10-19  9:19       ` Tejun Heo
2010-10-18  5:23 ` Minchan Kim
2010-10-18  9:44 ` Mel Gorman
2010-10-19  4:38   ` KOSAKI Motohiro
2010-10-19  9:18     ` [PATCH wq#for-next] workqueue: Clarify that schedule_on_each_cpu is synchronous Tejun Heo
2010-10-20  0:20       ` KAMEZAWA Hiroyuki
2010-10-20  0:54       ` Wu Fengguang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).