From: Pavel Machek <pavel@ucw.cz>
To: Saravana Kannan <skannan@codeaurora.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
cpufreq <cpufreq@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
Dave Jones <davej@redhat.com>, Thomas Renninger <trenn@suse.de>,
Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: CPUfreq - udelay() interaction issues
Date: Sat, 24 Apr 2010 07:56:52 +0200 [thread overview]
Message-ID: <20100424055652.GD2290@elf.ucw.cz> (raw)
In-Reply-To: <4BD25C37.4070005@codeaurora.org>
Hi!
> Seems a bit more complicated than what I had in mind. This is
> touching the scheduler I think we can get away without having to.
> Also, there is no simple implementation for the "slowpath" that can
> guarantee the delay without starting over the loop and hoping not to
> get interrupted or just giving up and doing a massively inaccurate
> delay (like msleep, etc).
>
> I was thinking of something along the lines of this:
>
> udelay()
> {
> if (!is_atomic())
> down_read(&freq_sem);
> /* else
> do nothing since cpufreq can't interrupt you.
> */
>
> call usual code since cpufreq is not going to preempt you.
>
> if (!is_atomic())
> up_read(&freq_sem);
> }
Well, most delays are very short, so...
What about... we decide that cpufreq interruption or switch to
different cpu takes 100usec minimum, and only try to do complex magic
for delays >100usec? Hopefully there's minimum of those :-).
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2010-04-24 5:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4BCFC3D0.5080904@codeaurora.org>
[not found] ` <4BD0D9E5.3020606@codeaurora.org>
2010-04-23 18:40 ` CPUfreq - udelay() interaction issues Mathieu Desnoyers
2010-04-23 19:22 ` Arjan van de Ven
2010-04-23 19:55 ` Mathieu Desnoyers
2010-04-24 18:56 ` Arjan van de Ven
2010-04-24 21:00 ` Mathieu Desnoyers
2010-04-24 23:20 ` Arjan van de Ven
2010-04-24 2:57 ` Saravana Kannan
2010-04-24 2:49 ` Saravana Kannan
2010-04-24 5:56 ` Pavel Machek [this message]
2010-04-24 13:58 ` Mathieu Desnoyers
2010-04-27 23:41 ` Saravana Kannan
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=20100424055652.GD2290@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=arjan@infradead.org \
--cc=cpufreq@vger.kernel.org \
--cc=davej@redhat.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=skannan@codeaurora.org \
--cc=trenn@suse.de \
/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