From: Rakib Mullick <rakib.mullick@gmail.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, Christoph Lameter <cl@linux.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Mel Gorman <mel@csn.ul.ie>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Subject: [PATCH] mm, vmstat: Use cond_resched only when !CONFIG_PREEMPT
Date: Mon, 30 May 2011 22:59:04 +0600 [thread overview]
Message-ID: <1306774744.4061.5.camel@localhost.localdomain> (raw)
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2011-05-30 17:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-30 16:59 Rakib Mullick [this message]
2011-05-30 23:38 ` KAMEZAWA Hiroyuki
2011-05-31 3:13 ` Rakib Mullick
2011-05-31 3:18 ` KAMEZAWA Hiroyuki
2011-05-31 3:58 ` Rakib Mullick
2011-05-31 4:29 ` KAMEZAWA Hiroyuki
2011-05-31 2:23 ` KOSAKI Motohiro
2011-05-31 3:19 ` Rakib Mullick
2011-05-31 5:55 ` Minchan Kim
2011-05-31 5:57 ` Minchan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306774744.4061.5.camel@localhost.localdomain \
--to=rakib.mullick@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox