public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: chpoph <chpoph@gmail.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Nicolas Pitre <nico@linaro.org>,
	Liviu Dudau <Liviu.Dudau@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: udelay function delays the wrong time interval in multiprocessor system, if ARCH_HAS_READ_CURRENT_TIMER is not defined and on current timer is used.
Date: Sun, 17 Mar 2013 20:05:43 +0000	[thread overview]
Message-ID: <20130317200543.GA20174@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CAM16m2n_Of0MJNtUsrL0MS2cXBZUHg9RzjSHcboDiHKB3s0cdw@mail.gmail.com>

On Sat, Mar 16, 2013 at 03:32:43AM +0000, chpoph wrote:
> On Sat, Mar 16, 2013 at 2:14 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > We don't support different CPUs running at different frequencies with
> > the delay loop.  Sorry.
> 
> Does it means that a timer-based delay implementation must be used to
> get an accurate delay in SMP. I think it should print a warning
> message if the CPU delay loop is used in SMP.  In my system, the wrong
> delay interval fluctuated with CPU frequencies caused a control
> problem.

I've been playing around with loops_per_jiffy recently, in an attempt to
clean up the cpufreq scaling code so that the SMP-ness is in core code,
rather than being duplicated by every architecture:

  git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git lpj

With those changes, it's pretty easy to get different delays depending on
the current CPU, but it would require preempt_{enable,disable} calls around
the delay, which I haven't convinced myself about.

Do you actually have an ARM platform that can scale the CPU frequencies
independently?

Will

  reply	other threads:[~2013-03-17 20:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 16:08 udelay function delays the wrong time interval in multiprocessor system, if ARCH_HAS_READ_CURRENT_TIMER is not defined and on current timer is used chpoph
2013-03-15 18:14 ` Russell King - ARM Linux
2013-03-16  3:32   ` chpoph
2013-03-17 20:05     ` Will Deacon [this message]
2013-03-17 23:08       ` Russell King - ARM Linux
2013-03-18 14:40         ` chpoph
2013-03-18 15:25           ` 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=20130317200543.GA20174@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=chpoph@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nico@linaro.org \
    --cc=stable@vger.kernel.org \
    --cc=viresh.kumar@linaro.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