From: john stultz <johnstul@us.ibm.com>
To: Guillaume Chazarain <guichaz@gmail.com>
Cc: Andi Kleen <ak@suse.de>,
mathieu.desnoyers@polymtl.ca, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add an offset in the cyc2ns computation to fix sched_clock jumps
Date: Fri, 16 Mar 2007 11:26:05 -0700 [thread overview]
Message-ID: <1174069565.22201.7.camel@localhost> (raw)
In-Reply-To: <3d8471ca0703161114o7ad654car60c1a6b801401149@mail.gmail.com>
On Fri, 2007-03-16 at 19:14 +0100, Guillaume Chazarain wrote:
> Hello,
>
> The scheduling problems I reported in the thread:
> http://lkml.org/lkml/2007/3/3/128
> are caused by the set_cyc2ns_scale() function called when the CPU speed changes.
> Changing the scale causes a warp in the value returned by sched_clock().
>
> The attached patch fixes the problem by adding an offset to the cyc2ns code to
> smooth CPU frequency transitions. It also makes the cyc2ns parameters
> per-CPU as cpufreq seems to support SMP but I don't have the hardware
> to test. If you want
> a version without the per-CPU or irqsave stuff, just ask.
Oh great! This has been a long standing issue I've never managed to get
around to and your approach to fixing it is simpler then what I was
thinking it would take.
Thanks for knocking this off!
> Although it solved all my scheduler issues, it may not be fully satisfactory
> as for example my TSC can run at a frequency as low as 350 MHz when the CPU is
> idle and slowed down to the max at 798 MHz by ondemand. So in this case,
> sched_clock() does not return nanoseconds as it thinks it does. Hopefully this
> is a non-issue as the scheduler is not stressed when the CPU is idle.
Hmm.. It drops to 350MHz on idle, but only ~800Mhz by on-demand? That
sounds more like the C3 idle TSC halt issue.
> For me, this is needed in 2.6.21 if I want to be able to listen to music while
> compiling a kernel using the ondemand governor.
>
> Thanks.
>
> Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Acked-by: John Stultz <johnstul@us.ibm.com>
next prev parent reply other threads:[~2007-03-16 18:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 18:14 Guillaume Chazarain
2007-03-16 18:22 ` Andi Kleen
2007-03-16 18:48 ` Guillaume Chazarain
2007-03-16 18:26 ` john stultz [this message]
2007-03-16 18:30 ` Daniel Walker
2007-03-16 18:36 ` Andreas Kleen
2007-03-16 18:44 ` Guillaume Chazarain
2007-03-18 21:08 ` Mathieu Desnoyers
2007-03-18 22:09 ` Guillaume Chazarain
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=1174069565.22201.7.camel@localhost \
--to=johnstul@us.ibm.com \
--cc=ak@suse.de \
--cc=guichaz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
/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
all inboxes | Powered by JetHome®