From: Stephen Boyd <sboyd@codeaurora.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Colin Cross <ccross@google.com>,
linux-omap@vger.kernel.org, Sanjeev Premi <premi@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv2] omap2+: pm: cpufreq: Fix loops_per_jiffy calculation
Date: Wed, 29 Jun 2011 11:29:29 -0700 [thread overview]
Message-ID: <4E0B6F09.7010401@codeaurora.org> (raw)
In-Reply-To: <20110628231711.GC23312@n2100.arm.linux.org.uk>
On 06/28/2011 04:17 PM, Russell King - ARM Linux wrote:
>
> That's why people have proposed hardware-timer based delay loops -
> these screw up the bogomips value (it no longer refers to the CPU
> but to the timer used for the delays) and the code proposed thus far
> probably has a severe negative impact on ARMs running at low clock
> rates (the calculation cost of the number of loops to run becomes
> significant for CPUs below 100MHz for short delays with the existing
> optimized assembler, so moving it into C and introducing function
> pointers will only make it worse.)
Am I people? ;-)
The code I've proposed doesn't seem to have a negative impact on our
targets even when the processor is running at 19.2 Mhz. Before and after
the patches I get the same lpj value (this is all described in the
commit text). I've also shown that rewriting delay.S into C doesn't
negatively affect the hand optimized assembly as the before and after
object code is nearly identical modulo register allocation. The only
issue would be the one function pointer which I haven't heard anyone
complain about until now.
Even if the time to get into the __delay() routine increases by a few
instructions I don't see how this harms anything as udelay() is a
minimum time guarantee. We should strive to make it as close as possible
to the time requested by the caller, but we shouldn't balk at the
introduction of a few more cycles along the setup path. Finally, since
the calibration takes into account most of the new instructions I doubt
it will even be noticeable overhead to have the function pointers.
What more can I do to convince you to take this patch?
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2] omap2+: pm: cpufreq: Fix loops_per_jiffy calculation
Date: Wed, 29 Jun 2011 11:29:29 -0700 [thread overview]
Message-ID: <4E0B6F09.7010401@codeaurora.org> (raw)
In-Reply-To: <20110628231711.GC23312@n2100.arm.linux.org.uk>
On 06/28/2011 04:17 PM, Russell King - ARM Linux wrote:
>
> That's why people have proposed hardware-timer based delay loops -
> these screw up the bogomips value (it no longer refers to the CPU
> but to the timer used for the delays) and the code proposed thus far
> probably has a severe negative impact on ARMs running at low clock
> rates (the calculation cost of the number of loops to run becomes
> significant for CPUs below 100MHz for short delays with the existing
> optimized assembler, so moving it into C and introducing function
> pointers will only make it worse.)
Am I people? ;-)
The code I've proposed doesn't seem to have a negative impact on our
targets even when the processor is running at 19.2 Mhz. Before and after
the patches I get the same lpj value (this is all described in the
commit text). I've also shown that rewriting delay.S into C doesn't
negatively affect the hand optimized assembly as the before and after
object code is nearly identical modulo register allocation. The only
issue would be the one function pointer which I haven't heard anyone
complain about until now.
Even if the time to get into the __delay() routine increases by a few
instructions I don't see how this harms anything as udelay() is a
minimum time guarantee. We should strive to make it as close as possible
to the time requested by the caller, but we shouldn't balk at the
introduction of a few more cycles along the setup path. Finally, since
the calibration takes into account most of the new instructions I doubt
it will even be noticeable overhead to have the function pointers.
What more can I do to convince you to take this patch?
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2011-06-29 18:29 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 13:53 [PATCHv2] omap2+: pm: cpufreq: Fix loops_per_jiffy calculation Sanjeev Premi
2011-06-24 13:53 ` Sanjeev Premi
2011-06-24 13:59 ` Premi, Sanjeev
2011-06-24 13:59 ` Premi, Sanjeev
2011-06-24 14:01 ` Russell King - ARM Linux
2011-06-24 14:01 ` Russell King - ARM Linux
2011-06-24 14:09 ` Premi, Sanjeev
2011-06-24 14:09 ` Premi, Sanjeev
2011-06-24 14:14 ` Russell King - ARM Linux
2011-06-24 14:14 ` Russell King - ARM Linux
2011-06-24 15:12 ` Russell King - ARM Linux
2011-06-24 15:12 ` Russell King - ARM Linux
2011-06-24 15:34 ` Premi, Sanjeev
2011-06-24 15:34 ` Premi, Sanjeev
2011-06-24 17:50 ` Premi, Sanjeev
2011-06-24 17:50 ` Premi, Sanjeev
2011-06-24 18:51 ` Russell King - ARM Linux
2011-06-24 18:51 ` Russell King - ARM Linux
2011-06-24 20:14 ` Kevin Hilman
2011-06-24 20:14 ` Kevin Hilman
2011-06-25 16:20 ` Premi, Sanjeev
2011-06-25 16:20 ` Premi, Sanjeev
2011-06-24 18:48 ` Santosh Shilimkar
2011-06-24 18:48 ` Santosh Shilimkar
2011-06-25 18:53 ` Premi, Sanjeev
2011-06-25 18:53 ` Premi, Sanjeev
2011-06-25 19:09 ` Russell King - ARM Linux
2011-06-25 19:09 ` Russell King - ARM Linux
2011-06-27 4:54 ` Premi, Sanjeev
2011-06-27 4:54 ` Premi, Sanjeev
2011-06-27 7:40 ` Russell King - ARM Linux
2011-06-27 7:40 ` Russell King - ARM Linux
2011-06-24 14:35 ` Santosh Shilimkar
2011-06-24 14:35 ` Santosh Shilimkar
2011-06-24 14:40 ` Premi, Sanjeev
2011-06-24 14:40 ` Premi, Sanjeev
2011-06-24 14:47 ` Santosh Shilimkar
2011-06-24 14:47 ` Santosh Shilimkar
2011-06-28 22:29 ` Colin Cross
2011-06-28 22:29 ` Colin Cross
2011-06-28 22:45 ` Santosh Shilimkar
2011-06-28 22:45 ` Santosh Shilimkar
2011-06-28 22:56 ` Colin Cross
2011-06-28 22:56 ` Colin Cross
[not found] ` <CAMbhsRRctHC2wSi7cWjO2Fn_rM7=dMtTrt6PbsVehrgx9SKwzw@mail.gmail.com>
2011-06-28 23:00 ` Santosh Shilimkar
2011-06-28 23:00 ` Santosh Shilimkar
2011-06-28 23:04 ` Santosh Shilimkar
2011-06-28 23:04 ` Santosh Shilimkar
2011-06-28 23:03 ` Russell King - ARM Linux
2011-06-28 23:03 ` Russell King - ARM Linux
2011-06-28 23:07 ` Santosh Shilimkar
2011-06-28 23:07 ` Santosh Shilimkar
2011-06-28 22:55 ` Russell King - ARM Linux
2011-06-28 22:55 ` Russell King - ARM Linux
2011-06-28 22:58 ` Colin Cross
2011-06-28 22:58 ` Colin Cross
2011-06-28 23:17 ` Russell King - ARM Linux
2011-06-28 23:17 ` Russell King - ARM Linux
2011-06-28 23:37 ` Colin Cross
2011-06-28 23:37 ` Colin Cross
2011-06-28 23:46 ` Russell King - ARM Linux
2011-06-28 23:46 ` Russell King - ARM Linux
2011-06-28 23:59 ` Colin Cross
2011-06-28 23:59 ` Colin Cross
2011-06-29 14:00 ` Russell King - ARM Linux
2011-06-29 14:00 ` Russell King - ARM Linux
2011-06-29 16:57 ` Colin Cross
2011-06-29 16:57 ` Colin Cross
2011-06-29 18:29 ` Stephen Boyd [this message]
2011-06-29 18:29 ` Stephen Boyd
2011-06-29 18:43 ` Russell King - ARM Linux
2011-06-29 18:43 ` Russell King - ARM Linux
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=4E0B6F09.7010401@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=ccross@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=premi@ti.com \
--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.