From: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Stefan Seyfried
<seife-T+3qhDtrTvDv8lqoKu5MV4HBZQ1bDw0s@public.gmane.org>
Cc: ACPI Developers
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: Re: Centrino question
Date: 27 May 2004 02:13:25 -0400 [thread overview]
Message-ID: <1085638405.17692.59.camel@dhcppc4> (raw)
In-Reply-To: <20040525072725.GA12282-l0tNAEGuAhhzZ8+rp42Dbp9+tswZ0GTaehPwdyo5hKaELgA04lAiVw@public.gmane.org>
Stefan
The LAPIC TSC is not reliable when C3 runs.
Indeed, we need to either disable the TSC if C3 is enabled,
or disabled C3 if the TSC is used.
-Len
http://bugme.osdl.org/show_bug.cgi?id=2560
On Tue, 2004-05-25 at 03:27, Stefan Seyfried wrote:
> On Mon, May 24, 2004 at 09:11:18AM -0700, Ow Mun Heng wrote:
> > On Sun, 2004-05-23 at 06:21, Cyril Wattebled wrote:
> > > On 22 May 2004 23:24:10 -0400
> > > Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> > > > Linux slows the processor to 600MHz when Windows gets down to 200MHz?
> >
> > Len,
> >
> > On my system, either 2.4 or 2.6 kernel, running on battery, cpufreq is at 600Mhz but
> > if i were running gkrellm, the x86info plugin will show that the cpufreq is actually fluactuating
> > between 99 to 200 mHz. I'm not sure where this plugin gets it's data but..
>
> I am quite sure that this is due to the tool you are using and due to C3 usage.
> I don't know about the gkrellm x86info plugin, but the suse 9.1 powersaved
> has a function to get the "real" CPU speed. It goes something like this:
>
> float getRealProcessorSpeed() {
>
> /* get this function in cached memory */
> gettimeofday(&tvstart, NULL);
> __asm__ volatile ("rdtsc" : "=A" (x));
> cycles[0] = x;
> gettimeofday(&tvstart, NULL);
>
> /* we don't trust that this is any specific length of time */
> sleep_left = sleep(1);
> if (sleep_left || errno == EINTR)
> return -1.0;
> __asm__ volatile ("rdtsc" : "=A" (x));
> cycles[1] = x;
> gettimeofday(&tvstop, NULL);
> microseconds = ((tvstop.tv_sec-tvstart.tv_sec)*1000000) +
> (tvstop.tv_usec-tvstart.tv_usec);
>
> ret = (float)(cycles[1]-cycles[0])/microseconds;
> return ret;
> }
>
> There is of course some more checking around, it is only working on i386,
> not on ia64. This shows me:
>
> seife-4N56LNXDvWs@public.gmane.org:~> powersave -r
> 82.559082 MHz
>
> but from /sys/.../scaling_setspeed i see that my cpu is running on 600mhz.
>
> seife-4N56LNXDvWs@public.gmane.org:~> cat /proc/acpi/processor/CPU0/power
> active state: C3
> default state: C1
> bus master activity: 00000000
> states:
> C1: promotion[C2] demotion[--] latency[000] usage[00020000]
> C2: promotion[C3] demotion[C1] latency[002] usage[00737909]
> *C3: promotion[--] demotion[C2] latency[205] usage[35772579]
>
> if i force C2 state (by plugging in a usb mouse or playing sound), it shows
> the frequency correct:
>
> seife-4N56LNXDvWs@public.gmane.org:~> powersave -r
> 598.058594 MHz
>
> seife-4N56LNXDvWs@public.gmane.org:~> cat /proc/acpi/processor/CPU0/power
> active state: C2
> default state: C1
> bus master activity: ffffffff
> states:
> C1: promotion[C2] demotion[--] latency[000] usage[00020850]
> *C2: promotion[C3] demotion[C1] latency[002] usage[00770669]
> C3: promotion[--] demotion[C2] latency[205] usage[35825285]
>
> So the effects you are seeing are clearly related to a tool that is measuring
> wrong.
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
next prev parent reply other threads:[~2004-05-27 6:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-21 11:42 Centrino question Yu, Luming
[not found] ` <3ACA40606221794F80A5670F0AF15F84046AA243-SRlDPOYGfgogGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-05-22 0:56 ` Cyril Wattebled
[not found] ` <20040522005658.640e1d91.neurowork-GANU6spQydw@public.gmane.org>
2004-05-23 3:24 ` Len Brown
[not found] ` <1085282649.12352.739.camel-D2Zvc0uNKG8@public.gmane.org>
2004-05-23 13:21 ` Cyril Wattebled
[not found] ` <20040523132122.6ba363b4.neurowork-GANU6spQydw@public.gmane.org>
2004-05-24 16:11 ` Ow Mun Heng
[not found] ` <1085415078.12941.2.camel-C9mHTC703ZUb5wn6fCfWY+TW4wlIGRCZ@public.gmane.org>
2004-05-25 7:27 ` Stefan Seyfried
[not found] ` <20040525072725.GA12282-l0tNAEGuAhhzZ8+rp42Dbp9+tswZ0GTaehPwdyo5hKaELgA04lAiVw@public.gmane.org>
2004-05-27 6:13 ` Len Brown [this message]
[not found] ` <1085638405.17692.59.camel-D2Zvc0uNKG8@public.gmane.org>
2004-05-27 18:44 ` Stefan Seyfried
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=1085638405.17692.59.camel@dhcppc4 \
--to=len.brown-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=seife-T+3qhDtrTvDv8lqoKu5MV4HBZQ1bDw0s@public.gmane.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 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.