From: Joe Perches <joe@perches.com>
To: Diwakar Tundlam <dtundlam@nvidia.com>
Cc: "'Andrew Morton'" <akpm@linux-foundation.org>,
"'Phil Carmody'" <ext-phil.2.carmody@nokia.com>,
"'Russell King'" <rmk+kernel@arm.linux.org.uk>,
"'Greg Kroah-Hartman'" <gregkh@suse.de>,
"'Sameer Nanda'" <snanda@chromium.org>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
"'Linus Torvalds'" <torvalds@linux-foundation.org>
Subject: Re: [PATCH] init: check printed flag to skip printing message
Date: Thu, 08 Mar 2012 16:11:03 -0800 [thread overview]
Message-ID: <1331251863.30848.4.camel@joe2Laptop> (raw)
In-Reply-To: <1DD7BFEDD3147247B1355BEFEFE4665237994F30F4@HQMAIL04.nvidia.com>
On Thu, 2012-03-08 at 15:44 -0800, Diwakar Tundlam wrote:
> Otherwise the 'Calibration skipped' message gets printed everytime a CPU is
> hotplugged in, cluttering console for systems that frequently hotplug CPUs.
Perhaps this is more uniform and it saves a few bytes too.
$ size init/calibrate.o*
text data bss dec hex filename
2933 73 521 3527 dc7 init/calibrate.o.new
2957 73 513 3543 dd7 init/calibrate.o.old
init/calibrate.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/init/calibrate.c b/init/calibrate.c
index 5f117ca..4f0af03 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -267,31 +267,32 @@ void __cpuinit calibrate_delay(void)
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
lpj = per_cpu(cpu_loops_per_jiffy, this_cpu);
- pr_info("Calibrating delay loop (skipped) "
- "already calibrated this CPU");
+ if (!printed)
+ pr_info("Calibrating delay loop%s",
+ " (skipped) already calibrated this CPU");
} else if (preset_lpj) {
lpj = preset_lpj;
if (!printed)
- pr_info("Calibrating delay loop (skipped) "
- "preset value.. ");
+ pr_info("Calibrating delay loop%s",
+ " (skipped) preset value..");
} else if ((!printed) && lpj_fine) {
lpj = lpj_fine;
- pr_info("Calibrating delay loop (skipped), "
- "value calculated using timer frequency.. ");
+ pr_info("Calibrating delay loop%s",
+ " (skipped), value calculated using timer frequency..");
} else if ((lpj = calibrate_delay_is_known())) {
;
} else if ((lpj = calibrate_delay_direct()) != 0) {
if (!printed)
- pr_info("Calibrating delay using timer "
- "specific routine.. ");
+ pr_info("Calibrating delay loop%s",
+ " using timer specific routine..");
} else {
if (!printed)
- pr_info("Calibrating delay loop... ");
+ pr_info("Calibrating delay loop%s", "...");
lpj = calibrate_delay_converge();
}
per_cpu(cpu_loops_per_jiffy, this_cpu) = lpj;
if (!printed)
- pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n",
+ pr_cont(" %lu.%02lu BogoMIPS (lpj=%lu)\n",
lpj/(500000/HZ),
(lpj/(5000/HZ)) % 100, lpj);
next prev parent reply other threads:[~2012-03-09 0:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 12:44 [PATCH] scheduler: domain: init next_balance in nohz_idle_balancer with jiffies Peter De Schrijver
2012-01-31 15:44 ` Peter Zijlstra
2012-01-31 19:18 ` Diwakar Tundlam
2012-01-31 20:03 ` Peter Zijlstra
2012-01-31 19:23 ` Diwakar Tundlam
2012-01-31 20:02 ` Peter Zijlstra
2012-03-07 22:44 ` [PATCH] scheduler: domain: correctly initialize 'next_balance' in 'nohz' idle balancer Diwakar Tundlam
2012-03-08 10:39 ` Peter Zijlstra
2012-03-08 23:44 ` [PATCH] init: check printed flag to skip printing message Diwakar Tundlam
2012-03-09 0:07 ` Andrew Morton
2012-03-09 0:11 ` Joe Perches [this message]
2012-03-13 4:45 ` [tip:sched/core] sched/nohz: Correctly initialize 'next_balance' in 'nohz' idle balancer tip-bot for Diwakar Tundlam
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=1331251863.30848.4.camel@joe2Laptop \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=dtundlam@nvidia.com \
--cc=ext-phil.2.carmody@nokia.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pdeschrijver@nvidia.com \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=snanda@chromium.org \
--cc=torvalds@linux-foundation.org \
/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 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.