All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm, vmstat: Use cond_resched only when !CONFIG_PREEMPT
@ 2011-05-30 16:59 ` Rakib Mullick
  0 siblings, 0 replies; 20+ messages in thread
From: Rakib Mullick @ 2011-05-30 16:59 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: akpm, Christoph Lameter, KAMEZAWA Hiroyuki, Mel Gorman,
	KOSAKI Motohiro

commit 468fd62ed9 (vmstats: add cond_resched() to refresh_cpu_vm_stats()) added cond_resched() in refresh_cpu_vm_stats. Purpose of that patch was to allow other threads to run in non-preemptive case. This patch, makes sure that cond_resched() gets called when !CONFIG_PREEMPT is set. In a preemptiable kernel we don't need to call cond_resched().

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 20c18b7..72cf857 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -461,7 +461,11 @@ void refresh_cpu_vm_stats(int cpu)
 				p->expire = 3;
 #endif
 			}
+
+#ifndef CONFIG_PREEMPT
 		cond_resched();
+#endif
+
 #ifdef CONFIG_NUMA
 		/*
 		 * Deal with draining the remote pageset of this



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

end of thread, other threads:[~2011-05-31  5:58 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-30 16:59 [PATCH] mm, vmstat: Use cond_resched only when !CONFIG_PREEMPT Rakib Mullick
2011-05-30 16:59 ` Rakib Mullick
2011-05-30 23:38 ` KAMEZAWA Hiroyuki
2011-05-30 23:38   ` KAMEZAWA Hiroyuki
2011-05-31  3:13   ` Rakib Mullick
2011-05-31  3:13     ` Rakib Mullick
2011-05-31  3:18     ` KAMEZAWA Hiroyuki
2011-05-31  3:18       ` KAMEZAWA Hiroyuki
2011-05-31  3:58       ` Rakib Mullick
2011-05-31  3:58         ` Rakib Mullick
2011-05-31  4:29         ` KAMEZAWA Hiroyuki
2011-05-31  4:29           ` KAMEZAWA Hiroyuki
2011-05-31  2:23 ` KOSAKI Motohiro
2011-05-31  2:23   ` KOSAKI Motohiro
2011-05-31  3:19   ` Rakib Mullick
2011-05-31  3:19     ` Rakib Mullick
2011-05-31  5:55 ` Minchan Kim
2011-05-31  5:55   ` Minchan Kim
2011-05-31  5:57   ` Minchan Kim
2011-05-31  5:57     ` Minchan Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.