From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: smp: Introduce ARCH_HAS_COMMON_CORES_CLOCK to speed-up boot
Date: Fri, 21 Jan 2011 17:08:22 +0000 [thread overview]
Message-ID: <20110121170822.GA30823@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <c1a2c539e2677e9a56d2d3aaaaf34851@mail.gmail.com>
On Fri, Jan 21, 2011 at 07:13:48PM +0530, Santosh Shilimkar wrote:
> > -----Original Message-----
> > From: Rob Herring [mailto:robherring2 at gmail.com]
> > Sent: Thursday, January 20, 2011 10:05 PM
> > To: Santosh Shilimkar
> > Cc: linux-arm-kernel at lists.infradead.org; Russell King; linux-
> > omap at vger.kernel.org; Linus Walleij
> > Subject: Re: [PATCH] ARM: smp: Introduce ARCH_HAS_COMMON_CORES_CLOCK
> > to speed-up boot
>
> [..]
>
> > >>
> > >> There's already one way to do this with pre-calculated lpj.
> > >>
> > > How about the hot-plug path? This is not for just boot.
> >
> > The path is the same for hotplug and secondary boot, so yes for
> > both.
> > Plus you get the added benefit of speeding up the primary core boot
> > as well.
> >
> No 'preset_lpj' will not work for the hotplug path when
> cpufreq is active. It just useful only for boot in
> its current form.
Indeed, it will end up screwing up the loops_per_jiffy value. That
would seem to be a hole on other architectures too. I wonder if
anyone has tested hotplug on a cpufreq-scaled system.
> @@ -332,14 +345,19 @@ void __init smp_cpus_done(unsigned int max_cpus)
> int cpu;
> unsigned long bogosum = 0;
>
> - for_each_online_cpu(cpu)
> - bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
> + if (!skip_secondary_calibrate) {
> + for_each_online_cpu(cpu)
> + bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
>
> - printk(KERN_INFO "SMP: Total of %d processors activated "
> - "(%lu.%02lu BogoMIPS).\n",
> - num_online_cpus(),
> - bogosum / (500000/HZ),
> - (bogosum / (5000/HZ)) % 100);
> + printk(KERN_INFO "SMP: Total of %d processors activated "
> + "(%lu.%02lu BogoMIPS).\n",
> + num_online_cpus(),
> + bogosum / (500000/HZ),
> + (bogosum / (5000/HZ)) % 100);
> + } else {
> + printk(KERN_INFO "SMP: Total of %d processors
> activated.\n",
> + num_online_cpus());
> + }
Hmm. How about:
char bogosum[32];
if (!skip_secondary_calibrate) {
for_each_online_cpu(cpu)
bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
snprintf(bogosum, sizeof(bogosum), " (%lu.%02lu BogoMIPS).\n",
bogosum / (500000/HZ), (bogosum / (5000/HZ)) % 100);
} else
bogosum[0] = '\0';
pr_info("SMP: Total of %d processors activated%s.\n",
num_online_cpus(), bogosum);
Looks neater and more compact and reduces the amount of string space
required.
next prev parent reply other threads:[~2011-01-21 17:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-20 9:42 [PATCH] ARM: smp: Introduce ARCH_HAS_COMMON_CORES_CLOCK to speed-up boot Santosh Shilimkar
2011-01-20 15:14 ` Rob Herring
2011-01-20 15:36 ` Santosh Shilimkar
2011-01-20 16:34 ` Rob Herring
2011-01-21 13:43 ` Santosh Shilimkar
2011-01-21 14:23 ` Linus Walleij
2011-01-21 15:00 ` Rob Herring
2011-01-21 17:15 ` Russell King - ARM Linux
2011-01-22 7:44 ` [PATCH] ARM: smp: Introduce ARCH_HAS_COMMON_CORES_CLOCK tospeed-up boot Santosh Shilimkar
2011-01-22 21:20 ` Russell King - ARM Linux
2011-01-23 7:25 ` [PATCH] ARM: smp: Introduce ARCH_HAS_COMMON_CORES_CLOCKtospeed-up boot Santosh Shilimkar
2011-01-21 17:08 ` Russell King - ARM Linux [this message]
2011-01-20 16:21 ` [PATCH] ARM: smp: Introduce ARCH_HAS_COMMON_CORES_CLOCK to speed-up boot Linus Walleij
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=20110121170822.GA30823@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).