From: Chuck Ebbert <76306.1226@compuserve.com>
To: Ingo Molnar <mingo@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [patch -mm4] sched: only print migration_cost once
Date: Fri, 3 Feb 2006 02:09:27 -0500 [thread overview]
Message-ID: <200602030212_MC3-1-B773-7D06@compuserve.com> (raw)
migration_cost prints after every CPU hotplug event. Make it
print only once at boot.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
--- 2.6.16-rc1-mm4-386.orig/kernel/sched.c
+++ 2.6.16-rc1-mm4-386/kernel/sched.c
@@ -5656,6 +5656,7 @@ static void calibrate_migration_costs(co
int cpu1 = -1, cpu2 = -1, cpu, orig_cpu = raw_smp_processor_id();
unsigned long j0, j1, distance, max_distance = 0;
struct sched_domain *sd;
+ static int printed_cost = 0; /* has cost already been printed? */
j0 = jiffies;
@@ -5699,13 +5700,16 @@ static void calibrate_migration_costs(co
-1
#endif
);
- printk("migration_cost=");
- for (distance = 0; distance <= max_distance; distance++) {
- if (distance)
- printk(",");
- printk("%ld", (long)migration_cost[distance] / 1000);
+ if (!printed_cost) {
+ printed_cost++;
+ printk("migration_cost=");
+ for (distance = 0; distance <= max_distance; distance++) {
+ if (distance)
+ printk(",");
+ printk("%ld", (long)migration_cost[distance] / 1000);
+ }
+ printk("\n");
}
- printk("\n");
j1 = jiffies;
if (migration_debug)
printk("migration: %ld seconds\n", (j1-j0)/HZ);
--
Chuck
next reply other threads:[~2006-02-03 12:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-03 7:09 Chuck Ebbert [this message]
2006-02-03 12:05 ` Ingo Molnar
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=200602030212_MC3-1-B773-7D06@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/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
Powered by JetHome