From: David Daney <ddaney@caviumnetworks.com>
To: Sameer Nanda <snanda@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
ext-phil.2.carmody@nokia.com, Tim.Deegan@citrix.com,
jbeulich@novell.com, snanda@google.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] init: skip calibration delay if previously done
Date: Fri, 03 Jun 2011 14:08:01 -0700 [thread overview]
Message-ID: <4DE94D31.3040104@caviumnetworks.com> (raw)
In-Reply-To: <20110603140054.a0f1859d.akpm@linux-foundation.org>
On 06/03/2011 02:00 PM, Andrew Morton wrote:
> On Tue, 24 May 2011 16:19:06 -0700
> Sameer Nanda<snanda@chromium.org> wrote:
>
>> For each CPU, do the calibration delay only once. For subsequent calls,
>> use the cached per-CPU value of loops_per_jiffy.
>>
>> This saves about 200ms of resume time on dual core Intel Atom N5xx based
>> systems. This helps bring down the kernel resume time on such systems from
>> about 500ms to about 300ms.
>>
>> Signed-off-by: Sameer Nanda<snanda@chromium.org>
>> ---
>> init/calibrate.c | 10 +++++++++-
>> 1 files changed, 9 insertions(+), 1 deletions(-)
>>
>> diff --git a/init/calibrate.c b/init/calibrate.c
>> index 76ac919..47d3408 100644
>> --- a/init/calibrate.c
>> +++ b/init/calibrate.c
>> @@ -183,11 +183,18 @@ recalibrate:
>> return lpj;
>> }
>>
>> +DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 };
>> +
>> void __cpuinit calibrate_delay(void)
>> {
>> static bool printed;
>> + int this_cpu = smp_processor_id();
>>
>> - if (preset_lpj) {
>> + if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
>> + loops_per_jiffy = per_cpu(cpu_loops_per_jiffy, this_cpu);
>> + pr_info("Calibrating delay loop (skipped) "
>> + "already calibrated this CPU previously.. ");
That wording seems a little redundant, and there are two '.' at the end.
How about:
s/"already calibrated this CPU previously.. "/", this CPU previously
calibrated."/
David Daney
next prev parent reply other threads:[~2011-06-03 21:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 23:19 [PATCH] init: skip calibration delay if previously done Sameer Nanda
2011-06-03 21:00 ` Andrew Morton
2011-06-03 21:08 ` David Daney [this message]
2011-06-03 21:45 ` Andrew Morton
2011-06-03 22:00 ` Joe Perches
2011-06-03 22:15 ` Sameer Nanda
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=4DE94D31.3040104@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=Tim.Deegan@citrix.com \
--cc=akpm@linux-foundation.org \
--cc=ext-phil.2.carmody@nokia.com \
--cc=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=snanda@chromium.org \
--cc=snanda@google.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