From: Rob Herring <robherring2@gmail.com>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-arm-kernel@lists.infradead.org,
Russell King <rmk+kernel@arm.linux.org.uk>,
linux-omap@vger.kernel.org,
Linus Walleij <linus.walleij@stericsson.com>
Subject: Re: [PATCH] ARM: smp: Introduce ARCH_HAS_COMMON_CORES_CLOCK to speed-up boot
Date: Fri, 21 Jan 2011 09:00:04 -0600 [thread overview]
Message-ID: <4D399F74.9050302@gmail.com> (raw)
In-Reply-To: <c1a2c539e2677e9a56d2d3aaaaf34851@mail.gmail.com>
Santosh,
On 01/21/2011 07:43 AM, Santosh Shilimkar wrote:
>> -----Original Message-----
>> From: Rob Herring [mailto:robherring2@gmail.com]
>> Sent: Thursday, January 20, 2011 10:05 PM
>> To: Santosh Shilimkar
>> Cc: linux-arm-kernel@lists.infradead.org; Russell King; linux-
>> omap@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.
Why? If preset_lpj is non-zero, calibrate_delay will effectively be
skipped which is the same thing your patch does.
This is the cpfreq loops_per_jiffy adjustment function for SMP:
static inline void adjust_jiffies(unsigned long val, struct
cpufreq_freqs *ci)
{
return;
}
And delay.S uses the global loops_per_jiffy, not the per cpu value. The
only place I see the per cpu value get used is /proc/cpuinfo.
Consider the following sequence:
- scale down the cpu freq
- hot unplug a core
- hot plug a core
- calls calibrate_delay and update the global loops_per_jiffy
- scale up the cpu freq
- udelay time is now much too short!!!
So for that reason, I would just remove calibrate_delay unconditionally.
Better to have the 1% inaccuracy and longer delays at low frequency than
to have too short of a delay at high freq.
Rob
WARNING: multiple messages have this Message-ID (diff)
From: robherring2@gmail.com (Rob Herring)
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 09:00:04 -0600 [thread overview]
Message-ID: <4D399F74.9050302@gmail.com> (raw)
In-Reply-To: <c1a2c539e2677e9a56d2d3aaaaf34851@mail.gmail.com>
Santosh,
On 01/21/2011 07:43 AM, 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.
Why? If preset_lpj is non-zero, calibrate_delay will effectively be
skipped which is the same thing your patch does.
This is the cpfreq loops_per_jiffy adjustment function for SMP:
static inline void adjust_jiffies(unsigned long val, struct
cpufreq_freqs *ci)
{
return;
}
And delay.S uses the global loops_per_jiffy, not the per cpu value. The
only place I see the per cpu value get used is /proc/cpuinfo.
Consider the following sequence:
- scale down the cpu freq
- hot unplug a core
- hot plug a core
- calls calibrate_delay and update the global loops_per_jiffy
- scale up the cpu freq
- udelay time is now much too short!!!
So for that reason, I would just remove calibrate_delay unconditionally.
Better to have the 1% inaccuracy and longer delays at low frequency than
to have too short of a delay at high freq.
Rob
next prev parent reply other threads:[~2011-01-21 15:00 UTC|newest]
Thread overview: 26+ 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 9:42 ` Santosh Shilimkar
2011-01-20 15:14 ` Rob Herring
2011-01-20 15:14 ` Rob Herring
2011-01-20 15:36 ` Santosh Shilimkar
2011-01-20 15:36 ` Santosh Shilimkar
2011-01-20 16:34 ` Rob Herring
2011-01-20 16:34 ` Rob Herring
2011-01-21 13:43 ` Santosh Shilimkar
2011-01-21 13:43 ` Santosh Shilimkar
2011-01-21 14:23 ` Linus Walleij
2011-01-21 14:23 ` Linus Walleij
2011-01-21 15:00 ` Rob Herring [this message]
2011-01-21 15:00 ` Rob Herring
2011-01-21 17:15 ` Russell King - ARM Linux
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 7:44 ` Santosh Shilimkar
2011-01-22 21:20 ` Russell King - ARM Linux
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-23 7:25 ` Santosh Shilimkar
2011-01-21 17:08 ` [PATCH] ARM: smp: Introduce ARCH_HAS_COMMON_CORES_CLOCK to speed-up boot Russell King - ARM Linux
2011-01-21 17:08 ` Russell King - ARM Linux
2011-01-20 16:21 ` Linus Walleij
2011-01-20 16:21 ` 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=4D399F74.9050302@gmail.com \
--to=robherring2@gmail.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=santosh.shilimkar@ti.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 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.