linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Will Deacon <will.deacon@arm.com>,
	John Stultz <john.stultz@linaro.org>,
	David Riley <davidriley@chromium.org>,
	"olof@lixom.net" <olof@lixom.net>,
	Sonny Rao <sonnyrao@chromium.org>,
	Richard Zhao <richard.zhao@linaro.org>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Stephen Warren <swarren@nvidia.com>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM: Don't ever downscale loops_per_jiffy in SMP systems#
Date: Mon, 12 May 2014 16:51:32 -0700	[thread overview]
Message-ID: <CAD=FV=UJK1nSPjH-au-KtbnOZk2nC7usLD8L9neMedj6WHUp8g@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1405091640090.980@knanqh.ubzr>

Hi,

On Fri, May 9, 2014 at 2:05 PM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> On Fri, 9 May 2014, Russell King - ARM Linux wrote:
>
>> I'd much prefer just printing a warning at kernel boot time to report
>> that the kernel is running with features which would make udelay() less
>> than accurate.
>
> What if there is simply no timer to rely upon, as in those cases where
> interrupts are needed for time keeping to make progress?  We should do
> better than simply saying "sorry your kernel should irradicate every
> udelay() usage to be reliable".
>
> And I mean "reliable" which is not exactly the same as "accurate".
> Reliable means "never *significantly* shorter".
>
>> Remember, it should be usable for _short_ delays on slow machines as
>> well as other stuff, and if we're going to start throwing stuff like
>> the above at it, it's going to become very inefficient.
>
> You said that udelay can be much longer than expected due to various
> reasons.
>
> You also said that the IRQ handler overhead during udelay calibration
> makes actual delays slightli shorter than expected.
>
> I'm suggesting the addition of a slight overhead that is much smaller
> than the IRQ handler here.  That shouldn't impact things masurably.
> I'd certainly like Doug to run his udelay timing test with the following
> patch to see if it solves the problem.

...so I spent a whole chunk of time debugging this problem today.  I'm
out of time today (more tomorrow), but it looks like the theory I
proposed about why udelay() is giving bad results _might_ have more to
do with bugs in the exynos cpufreq driver and less to do with the
theoretical race we've been talking about.  It looks possible that the
driver is not setting the "old" frequency properly, which would
certainly cause problems.

I'll post more when I figure this out for sure.

-Doug

  reply	other threads:[~2014-05-12 23:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 23:23 [PATCH] ARM: Don't ever downscale loops_per_jiffy in SMP systems Doug Anderson
2014-05-08 10:41 ` Viresh Kumar
2014-05-08 15:25   ` Doug Anderson
2014-05-08 16:04     ` Nicolas Pitre
2014-05-08 16:41       ` Doug Anderson
2014-05-08 17:43         ` Nicolas Pitre
2014-05-08 18:06           ` Doug Anderson
2014-05-08 19:59             ` Nicolas Pitre
2014-05-08 20:55             ` Russell King - ARM Linux
2014-05-09  0:02               ` Doug Anderson
2014-05-09  0:23                 ` Russell King - ARM Linux
2014-05-09  4:41                   ` Doug Anderson
2014-05-08 19:22           ` Russell King - ARM Linux
2014-05-08 20:12             ` Nicolas Pitre
2014-05-08 20:39               ` John Stultz
2014-05-08 20:52               ` Russell King - ARM Linux
2014-05-09  1:37                 ` Nicolas Pitre
2014-05-09  4:43                   ` Doug Anderson
2014-05-09  9:18                   ` [PATCH] ARM: Don't ever downscale loops_per_jiffy in SMP systems# Russell King - ARM Linux
2014-05-09 18:00                     ` Nicolas Pitre
2014-05-09 18:22                       ` Russell King - ARM Linux
2014-05-09 21:05                         ` Nicolas Pitre
2014-05-12 23:51                           ` Doug Anderson [this message]
2014-05-13 21:50                             ` Doug Anderson
2014-05-13 22:15                               ` Stephen Warren
2014-05-13 23:15                                 ` Nicolas Pitre
2014-05-13 23:29                                   ` Nicolas Pitre
2014-05-13 23:36                                     ` Russell King - ARM Linux
2014-05-14 21:42                                     ` Doug Anderson
2014-05-15  6:12                               ` Viresh Kumar
2014-05-09  9:25     ` [PATCH] ARM: Don't ever downscale loops_per_jiffy in SMP systems Viresh Kumar

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='CAD=FV=UJK1nSPjH-au-KtbnOZk2nC7usLD8L9neMedj6WHUp8g@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=davidriley@chromium.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=marc.zyngier@arm.com \
    --cc=nicolas.pitre@linaro.org \
    --cc=olof@lixom.net \
    --cc=paul.gortmaker@windriver.com \
    --cc=richard.zhao@linaro.org \
    --cc=rjw@rjwysocki.net \
    --cc=santosh.shilimkar@ti.com \
    --cc=sboyd@codeaurora.org \
    --cc=shawn.guo@linaro.org \
    --cc=sonnyrao@chromium.org \
    --cc=swarren@nvidia.com \
    --cc=viresh.kumar@linaro.org \
    --cc=will.deacon@arm.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;
as well as URLs for NNTP newsgroup(s).