2016-03-30 21:41:19

by Sedat Dilek

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

Hi,

I am using Intel-PState-Driver here with v4.6-rc1 and Intel-SandyBridge-CPU.

Here are my turbostat results attached.

$ cd $BUILD_DIR
$ LC_ALL=C make -C tools/ turbostat

$ sudo ./turbostat -i 1 --msr=0x199 --debug --out
/tmp/turbostat-i-1-msr-0x199-debug.txt

Will try <https://patchwork.kernel.org/patch/8702071/>.

Please see attached files.

Regards,
- Sedat -


Attachments:
dmesg_4.6.0-rc1-11-iniza-small.txt (62.02 kB)
config-4.6.0-rc1-11-iniza-small (131.78 kB)
turbostat-i-1-msr-0x199-debug.txt (32.78 kB)
Download all attachments

2016-03-30 21:58:48

by Wysocki, Rafael J

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On 3/30/2016 11:41 PM, Sedat Dilek wrote:
> Hi,
>
> I am using Intel-PState-Driver here with v4.6-rc1 and Intel-SandyBridge-CPU.
>
> Here are my turbostat results attached.
>
> $ cd $BUILD_DIR
> $ LC_ALL=C make -C tools/ turbostat
>
> $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
> /tmp/turbostat-i-1-msr-0x199-debug.txt
>
> Will try <https://patchwork.kernel.org/patch/8702071/>.
>
> Please see attached files.

Thanks for the report.

The address of linux-pm in your original message was incorrect. Can you
please resend the turbostat output in reply to this message?

Thanks,
Rafael

2016-03-30 22:18:17

by srinivas pandruvada

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
> Hi,
>
> I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
> SandyBridge-CPU.
>
> Here are my turbostat results attached.
>
> $ cd $BUILD_DIR
> $ LC_ALL=C make -C tools/ turbostat
>
> $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
> /tmp/turbostat-i-1-msr-0x199-debug.txt
>
> Will try <https://patchwork.kernel.org/patch/8702071/>.
>
> Please see attached files.
>
Thanks. Your logs make sense. You have config set to performance mode
by default (Which I believe default in all kernel Ubuntu). So as
expected Intel P state was asking for max. So there is no issue here.

I would expect the same in Jorg's platform. But he has a haswell which
has a special feature called config TDP. So he is effectively running
in powersave mode, his platform may be forcing to lower TDP.

So Jorg, can you send the turbostate also with the above debug option.
Also

rdmsr 0xce
rdmsr 0x1ad
rdmsr 0x648
rdmsr 0x649
rdmsr 0x64A
rdmsr 0x64b
rdmsr 0x64c

Thanks,
Srinivas

2016-03-30 22:24:00

by Sedat Dilek

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Wed, Mar 30, 2016 at 11:58 PM, Rafael J. Wysocki
<[email protected]> wrote:
> On 3/30/2016 11:41 PM, Sedat Dilek wrote:
>>
>> Hi,
>>
>> I am using Intel-PState-Driver here with v4.6-rc1 and
>> Intel-SandyBridge-CPU.
>>
>> Here are my turbostat results attached.
>>
>> $ cd $BUILD_DIR
>> $ LC_ALL=C make -C tools/ turbostat
>>
>> $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>> /tmp/turbostat-i-1-msr-0x199-debug.txt
>>
>> Will try <https://patchwork.kernel.org/patch/8702071/>.
>>
>> Please see attached files.
>
>
> Thanks for the report.
>
> The address of linux-pm in your original message was incorrect. Can you
> please resend the turbostat output in reply to this message?
>

Sorry for the wrong ML.

Attached are new (-12 with your simplified revert) and old turbostat outputs.

- Sedat -


Attachments:
turbostat-i-1-msr-0x199-debug.txt (32.78 kB)
turbostat-i-1-msr-0x199-debug_4.6.0-rc1-12-iniza-small.txt (22.49 kB)
Download all attachments

2016-03-30 22:26:06

by Wysocki, Rafael J

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
> On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
>> Hi,
>>
>> I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
>> SandyBridge-CPU.
>>
>> Here are my turbostat results attached.
>>
>> $ cd $BUILD_DIR
>> $ LC_ALL=C make -C tools/ turbostat
>>
>> $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>> /tmp/turbostat-i-1-msr-0x199-debug.txt
>>
>> Will try <https://patchwork.kernel.org/patch/8702071/>.
>>
>> Please see attached files.
>>
> Thanks. Your logs make sense. You have config set to performance mode
> by default (Which I believe default in all kernel Ubuntu). So as
> expected Intel P state was asking for max. So there is no issue here.

But the behavior is different from what it used to be, isn't it?

So there seems to be a problem here AFAICS.

2016-03-30 22:29:25

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 12:23 AM, Sedat Dilek <[email protected]> wrote:
> On Wed, Mar 30, 2016 at 11:58 PM, Rafael J. Wysocki
> <[email protected]> wrote:
>> On 3/30/2016 11:41 PM, Sedat Dilek wrote:
>>>
>>> Hi,
>>>
>>> I am using Intel-PState-Driver here with v4.6-rc1 and
>>> Intel-SandyBridge-CPU.
>>>
>>> Here are my turbostat results attached.
>>>
>>> $ cd $BUILD_DIR
>>> $ LC_ALL=C make -C tools/ turbostat
>>>
>>> $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>>> /tmp/turbostat-i-1-msr-0x199-debug.txt
>>>
>>> Will try <https://patchwork.kernel.org/patch/8702071/>.
>>>
>>> Please see attached files.
>>
>>
>> Thanks for the report.
>>
>> The address of linux-pm in your original message was incorrect. Can you
>> please resend the turbostat output in reply to this message?
>>
>
> Sorry for the wrong ML.
>
> Attached are new (-12 with your simplified revert) and old turbostat outputs.

So the simplified revert doesn't help - or does it?

2016-03-30 22:46:30

by srinivas pandruvada

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, 2016-03-31 at 00:25 +0200, Rafael J. Wysocki wrote:
> On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
> >
> > On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
> > >
> > > Hi,
> > >
> > > I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
> > > SandyBridge-CPU.
> > >
> > > Here are my turbostat results attached.
> > >
> > > $ cd $BUILD_DIR
> > > $ LC_ALL=C make -C tools/ turbostat
> > >
> > > $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
> > > /tmp/turbostat-i-1-msr-0x199-debug.txt
> > >
> > > Will try <https://patchwork.kernel.org/patch/8702071/>.
> > >
> > > Please see attached files.
> > >
> > Thanks. Your logs make sense. You have config set to performance
> > mode
> > by default (Which I believe default in all kernel Ubuntu). So as
> > expected Intel P state was asking for max. So there is no issue
> > here.
> But the behavior is different from what it used to be, isn't it?
>
There are two turbostat output files, In both I see we are requesting
max (0x1700) in performance mode. This CPU is Sandybridge, so no config
TDP here, the other problem system reported is Haswell
.
 0       1       3    0.15    2017    1596  0x00001700 

I am not sure whether Sedat is saying that he has the same issue as
Jorg. I think Sedat will see the same turbostat output if he ran 4.5.

Sedat, 
Please confirm whether you see difference between 4.5 and 4.6-rc1.

Thanks,
Srinivas

> So there seems to be a problem here AFAICS.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm"
> in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

2016-03-30 22:50:16

by Doug Smythies

[permalink] [raw]
Subject: RE: [intel-pstate driver regression] processor frequency very high even if in idle

On 2106.03.30 15:19 Srinivas Pandruvada wrote:
>>
>> Please see attached files.
>>
> Thanks. Your logs make sense. You have config set to performance mode
> by default (Which I believe default in all kernel Ubuntu).

Yes, but via a startup script, by default Ubuntu sets the governor
to powersave 1 minute after boot (or ondemand if acpi-cpufreq).

> So as
> expected Intel P state was asking for max. So there is no issue here.

Yes, your point is valid, as this does not appear to be a Ubuntu kernel
configuration file, as the size is not correct.

Should be:
-rw-r--r-- 1 doug doug 194436 Mar 26 18:59 ../temp-k-git/linux/.config-4.6.0-040600rc1-generic
Is:
-rw-r--r-- 1 doug doug 134944 Mar 30 15:21 config-4.6.0-rc1-11-iniza-small


2016-03-30 23:12:41

by srinivas pandruvada

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Wed, 2016-03-30 at 15:50 -0700, Doug Smythies wrote:
> On 2106.03.30 15:19 Srinivas Pandruvada wrote:
> >
> > >
> > >
> > > Please see attached files.
> > >
> > Thanks. Your logs make sense. You have config set to performance
> > mode
> > by default (Which I believe default in all kernel Ubuntu).
> Yes, but via a startup script, by default Ubuntu sets the governor
> to powersave 1 minute after boot (or ondemand if acpi-cpufreq).
>
You are correct. So after a minute it changes to powersave by some
script.

Thanks,
Srinivas

2016-03-30 23:17:14

by Pandruvada, Srinivas

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Wed, 2016-03-30 at 15:46 -0700, Srinivas Pandruvada wrote:
> On Thu, 2016-03-31 at 00:25 +0200, Rafael J. Wysocki wrote:
> >
> > On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
> > >
> > >
> > > On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
> > > > SandyBridge-CPU.
> > > >
> > > > Here are my turbostat results attached.
> > > >
> > > > $ cd $BUILD_DIR
> > > > $ LC_ALL=C make -C tools/ turbostat
> > > >
> > > > $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
> > > > /tmp/turbostat-i-1-msr-0x199-debug.txt
> > > >
> > > > Will try <https://patchwork.kernel.org/patch/8702071/>.
> > > >
> > > > Please see attached files.
> > > >
> > > Thanks. Your logs make sense. You have config set to performance
> > > mode
> > > by default (Which I believe default in all kernel Ubuntu). So as
> > > expected Intel P state was asking for max. So there is no issue
> > > here.
> > But the behavior is different from what it used to be, isn't it?
> >
> There are two turbostat output files, In both I see we are requesting
> max (0x1700) in performance mode. This CPU is Sandybridge, so no
> config
> TDP here, the other problem system reported is Haswell
> .
>  0       1       3    0.15    2017    1596  0x00001700 
>
> I am not sure whether Sedat is saying that he has the same issue as
> Jorg. I think Sedat will see the same turbostat output if he ran 4.5.
>
I takeback my statements. It will depend on when he ran turbostat, is
it within a minute or so. As doug suggested, ubuntu changes the mode to
powersave, then we shouldn't see 0x1700 in MSR 0x199.
Sedat,
What is the output of 
cat /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor 

Thanks,
Srinivas

> Sedat, 
> Please confirm whether you see difference between 4.5 and 4.6-rc1.
>
> Thanks,
> Srinivas
>
> >
> > So there seems to be a problem here AFAICS.
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-pm"
> > in
> > the body of a message to [email protected]
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm"
> in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

2016-03-30 23:25:28

by Sedat Dilek

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 1:17 AM, Pandruvada, Srinivas
<[email protected]> wrote:
> On Wed, 2016-03-30 at 15:46 -0700, Srinivas Pandruvada wrote:
>> On Thu, 2016-03-31 at 00:25 +0200, Rafael J. Wysocki wrote:
>> >
>> > On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
>> > >
>> > >
>> > > On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
>> > > >
>> > > >
>> > > > Hi,
>> > > >
>> > > > I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
>> > > > SandyBridge-CPU.
>> > > >
>> > > > Here are my turbostat results attached.
>> > > >
>> > > > $ cd $BUILD_DIR
>> > > > $ LC_ALL=C make -C tools/ turbostat
>> > > >
>> > > > $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>> > > > /tmp/turbostat-i-1-msr-0x199-debug.txt
>> > > >
>> > > > Will try <https://patchwork.kernel.org/patch/8702071/>.
>> > > >
>> > > > Please see attached files.
>> > > >
>> > > Thanks. Your logs make sense. You have config set to performance
>> > > mode
>> > > by default (Which I believe default in all kernel Ubuntu). So as
>> > > expected Intel P state was asking for max. So there is no issue
>> > > here.
>> > But the behavior is different from what it used to be, isn't it?
>> >
>> There are two turbostat output files, In both I see we are requesting
>> max (0x1700) in performance mode. This CPU is Sandybridge, so no
>> config
>> TDP here, the other problem system reported is Haswell
>> .
>> 0 1 3 0.15 2017 1596 0x00001700
>>
>> I am not sure whether Sedat is saying that he has the same issue as
>> Jorg. I think Sedat will see the same turbostat output if he ran 4.5.
>>
> I takeback my statements. It will depend on when he ran turbostat, is
> it within a minute or so. As doug suggested, ubuntu changes the mode to
> powersave, then we shouldn't see 0x1700 in MSR 0x199.
> Sedat,
> What is the output of
> cat /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor
>
> Thanks,
> Srinivas
>
>> Sedat,
>> Please confirm whether you see difference between 4.5 and 4.6-rc1.
>>
>> Thanks,
>> Srinivas
>>
>> >
>> > So there seems to be a problem here AFAICS.

Too much questions.

I switched to CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and tested with
the simplified revert-patch of Rafael.

$ cat /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor
powersave
powersave
powersave
powersave

Bzy_MHz and MSR 0x199 looks OK in my turbostat output?

- Sedat -


Attachments:
turbostat-i-1-msr-0x199-debug_4.6.0-rc1-13-iniza-small.txt (29.35 kB)
config-4.6.0-rc1-13-iniza-small (131.78 kB)
dmesg_4.6.0-rc1-13-iniza-small.txt (60.34 kB)
Download all attachments

2016-03-30 23:29:04

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 1:25 AM, Sedat Dilek <[email protected]> wrote:
> On Thu, Mar 31, 2016 at 1:17 AM, Pandruvada, Srinivas
> <[email protected]> wrote:
>> On Wed, 2016-03-30 at 15:46 -0700, Srinivas Pandruvada wrote:
>>> On Thu, 2016-03-31 at 00:25 +0200, Rafael J. Wysocki wrote:
>>> >
>>> > On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
>>> > >
>>> > >
>>> > > On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
>>> > > >
>>> > > >
>>> > > > Hi,
>>> > > >
>>> > > > I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
>>> > > > SandyBridge-CPU.
>>> > > >
>>> > > > Here are my turbostat results attached.
>>> > > >
>>> > > > $ cd $BUILD_DIR
>>> > > > $ LC_ALL=C make -C tools/ turbostat
>>> > > >
>>> > > > $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>>> > > > /tmp/turbostat-i-1-msr-0x199-debug.txt
>>> > > >
>>> > > > Will try <https://patchwork.kernel.org/patch/8702071/>.
>>> > > >
>>> > > > Please see attached files.
>>> > > >
>>> > > Thanks. Your logs make sense. You have config set to performance
>>> > > mode
>>> > > by default (Which I believe default in all kernel Ubuntu). So as
>>> > > expected Intel P state was asking for max. So there is no issue
>>> > > here.
>>> > But the behavior is different from what it used to be, isn't it?
>>> >

[cut]

>
> Too much questions.

OK

> I switched to CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and tested with
> the simplified revert-patch of Rafael.

Why do you need the revert patch in the first place?

2016-03-30 23:32:10

by Sedat Dilek

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 1:28 AM, Rafael J. Wysocki <[email protected]> wrote:
> On Thu, Mar 31, 2016 at 1:25 AM, Sedat Dilek <[email protected]> wrote:
>> On Thu, Mar 31, 2016 at 1:17 AM, Pandruvada, Srinivas
>> <[email protected]> wrote:
>>> On Wed, 2016-03-30 at 15:46 -0700, Srinivas Pandruvada wrote:
>>>> On Thu, 2016-03-31 at 00:25 +0200, Rafael J. Wysocki wrote:
>>>> >
>>>> > On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
>>>> > >
>>>> > >
>>>> > > On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
>>>> > > >
>>>> > > >
>>>> > > > Hi,
>>>> > > >
>>>> > > > I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
>>>> > > > SandyBridge-CPU.
>>>> > > >
>>>> > > > Here are my turbostat results attached.
>>>> > > >
>>>> > > > $ cd $BUILD_DIR
>>>> > > > $ LC_ALL=C make -C tools/ turbostat
>>>> > > >
>>>> > > > $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>>>> > > > /tmp/turbostat-i-1-msr-0x199-debug.txt
>>>> > > >
>>>> > > > Will try <https://patchwork.kernel.org/patch/8702071/>.
>>>> > > >
>>>> > > > Please see attached files.
>>>> > > >
>>>> > > Thanks. Your logs make sense. You have config set to performance
>>>> > > mode
>>>> > > by default (Which I believe default in all kernel Ubuntu). So as
>>>> > > expected Intel P state was asking for max. So there is no issue
>>>> > > here.
>>>> > But the behavior is different from what it used to be, isn't it?
>>>> >
>
> [cut]
>
>>
>> Too much questions.
>
> OK
>
>> I switched to CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and tested with
>> the simplified revert-patch of Rafael.
>
> Why do you need the revert patch in the first place?

I simply wanted to test CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and
keep the rest.

- Sedat -

2016-03-30 23:41:26

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 1:32 AM, Sedat Dilek <[email protected]> wrote:
> On Thu, Mar 31, 2016 at 1:28 AM, Rafael J. Wysocki <[email protected]> wrote:
>> On Thu, Mar 31, 2016 at 1:25 AM, Sedat Dilek <[email protected]> wrote:
>>> On Thu, Mar 31, 2016 at 1:17 AM, Pandruvada, Srinivas
>>> <[email protected]> wrote:
>>>> On Wed, 2016-03-30 at 15:46 -0700, Srinivas Pandruvada wrote:
>>>>> On Thu, 2016-03-31 at 00:25 +0200, Rafael J. Wysocki wrote:
>>>>> >
>>>>> > On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
>>>>> > >
>>>>> > >
>>>>> > > On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
>>>>> > > >
>>>>> > > >
>>>>> > > > Hi,
>>>>> > > >
>>>>> > > > I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
>>>>> > > > SandyBridge-CPU.
>>>>> > > >
>>>>> > > > Here are my turbostat results attached.
>>>>> > > >
>>>>> > > > $ cd $BUILD_DIR
>>>>> > > > $ LC_ALL=C make -C tools/ turbostat
>>>>> > > >
>>>>> > > > $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>>>>> > > > /tmp/turbostat-i-1-msr-0x199-debug.txt
>>>>> > > >
>>>>> > > > Will try <https://patchwork.kernel.org/patch/8702071/>.
>>>>> > > >
>>>>> > > > Please see attached files.
>>>>> > > >
>>>>> > > Thanks. Your logs make sense. You have config set to performance
>>>>> > > mode
>>>>> > > by default (Which I believe default in all kernel Ubuntu). So as
>>>>> > > expected Intel P state was asking for max. So there is no issue
>>>>> > > here.
>>>>> > But the behavior is different from what it used to be, isn't it?
>>>>> >
>>
>> [cut]
>>
>>>
>>> Too much questions.
>>
>> OK
>>
>>> I switched to CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and tested with
>>> the simplified revert-patch of Rafael.
>>
>> Why do you need the revert patch in the first place?
>
> I simply wanted to test CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and
> keep the rest.

But it is not clear to us whether or not your system has regressed
with respect to 4.5, which is the whole point of this thread. Do you
see a regression here?

Jörg in particular is saying that he sees the problem with both
performance and powersave settings. What about you?

2016-03-31 06:38:15

by Sedat Dilek

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 1:41 AM, Rafael J. Wysocki <[email protected]> wrote:
> On Thu, Mar 31, 2016 at 1:32 AM, Sedat Dilek <[email protected]> wrote:
>> On Thu, Mar 31, 2016 at 1:28 AM, Rafael J. Wysocki <[email protected]> wrote:
>>> On Thu, Mar 31, 2016 at 1:25 AM, Sedat Dilek <[email protected]> wrote:
>>>> On Thu, Mar 31, 2016 at 1:17 AM, Pandruvada, Srinivas
>>>> <[email protected]> wrote:
>>>>> On Wed, 2016-03-30 at 15:46 -0700, Srinivas Pandruvada wrote:
>>>>>> On Thu, 2016-03-31 at 00:25 +0200, Rafael J. Wysocki wrote:
>>>>>> >
>>>>>> > On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
>>>>>> > >
>>>>>> > >
>>>>>> > > On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
>>>>>> > > >
>>>>>> > > >
>>>>>> > > > Hi,
>>>>>> > > >
>>>>>> > > > I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
>>>>>> > > > SandyBridge-CPU.
>>>>>> > > >
>>>>>> > > > Here are my turbostat results attached.
>>>>>> > > >
>>>>>> > > > $ cd $BUILD_DIR
>>>>>> > > > $ LC_ALL=C make -C tools/ turbostat
>>>>>> > > >
>>>>>> > > > $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>>>>>> > > > /tmp/turbostat-i-1-msr-0x199-debug.txt
>>>>>> > > >
>>>>>> > > > Will try <https://patchwork.kernel.org/patch/8702071/>.
>>>>>> > > >
>>>>>> > > > Please see attached files.
>>>>>> > > >
>>>>>> > > Thanks. Your logs make sense. You have config set to performance
>>>>>> > > mode
>>>>>> > > by default (Which I believe default in all kernel Ubuntu). So as
>>>>>> > > expected Intel P state was asking for max. So there is no issue
>>>>>> > > here.
>>>>>> > But the behavior is different from what it used to be, isn't it?
>>>>>> >
>>>
>>> [cut]
>>>
>>>>
>>>> Too much questions.
>>>
>>> OK
>>>
>>>> I switched to CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and tested with
>>>> the simplified revert-patch of Rafael.
>>>
>>> Why do you need the revert patch in the first place?
>>
>> I simply wanted to test CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and
>> keep the rest.
>
> But it is not clear to us whether or not your system has regressed
> with respect to 4.5, which is the whole point of this thread. Do you
> see a regression here?
>
> Jörg in particular is saying that he sees the problem with both
> performance and powersave settings. What about you?

I have only tested with 4.6-rc1.
My 4.5 kernel has no CONFIG_X86_MSR=m which is mandatory for turbostat.

With CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and without your
simplified revert-patch.
The values of Bzy_MHz look good for me.

CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y is somehow showing higher
values than TSC_MHz.
Not sure if this really make sense if TSC_MHz is a max-value (which I
don't know it is).

- Sedat -


Attachments:
turbostat-i-1-msr-0x199-debug_4.6.0-rc1-14-iniza-small.txt (61.07 kB)

2016-03-31 07:45:10

by Sedat Dilek

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 8:38 AM, Sedat Dilek <[email protected]> wrote:
> On Thu, Mar 31, 2016 at 1:41 AM, Rafael J. Wysocki <[email protected]> wrote:
>> On Thu, Mar 31, 2016 at 1:32 AM, Sedat Dilek <[email protected]> wrote:
>>> On Thu, Mar 31, 2016 at 1:28 AM, Rafael J. Wysocki <[email protected]> wrote:
>>>> On Thu, Mar 31, 2016 at 1:25 AM, Sedat Dilek <[email protected]> wrote:
>>>>> On Thu, Mar 31, 2016 at 1:17 AM, Pandruvada, Srinivas
>>>>> <[email protected]> wrote:
>>>>>> On Wed, 2016-03-30 at 15:46 -0700, Srinivas Pandruvada wrote:
>>>>>>> On Thu, 2016-03-31 at 00:25 +0200, Rafael J. Wysocki wrote:
>>>>>>> >
>>>>>>> > On 3/31/2016 12:18 AM, Srinivas Pandruvada wrote:
>>>>>>> > >
>>>>>>> > >
>>>>>>> > > On Wed, 2016-03-30 at 23:41 +0200, Sedat Dilek wrote:
>>>>>>> > > >
>>>>>>> > > >
>>>>>>> > > > Hi,
>>>>>>> > > >
>>>>>>> > > > I am using Intel-PState-Driver here with v4.6-rc1 and Intel-
>>>>>>> > > > SandyBridge-CPU.
>>>>>>> > > >
>>>>>>> > > > Here are my turbostat results attached.
>>>>>>> > > >
>>>>>>> > > > $ cd $BUILD_DIR
>>>>>>> > > > $ LC_ALL=C make -C tools/ turbostat
>>>>>>> > > >
>>>>>>> > > > $ sudo ./turbostat -i 1 --msr=0x199 --debug --out
>>>>>>> > > > /tmp/turbostat-i-1-msr-0x199-debug.txt
>>>>>>> > > >
>>>>>>> > > > Will try <https://patchwork.kernel.org/patch/8702071/>.
>>>>>>> > > >
>>>>>>> > > > Please see attached files.
>>>>>>> > > >
>>>>>>> > > Thanks. Your logs make sense. You have config set to performance
>>>>>>> > > mode
>>>>>>> > > by default (Which I believe default in all kernel Ubuntu). So as
>>>>>>> > > expected Intel P state was asking for max. So there is no issue
>>>>>>> > > here.
>>>>>>> > But the behavior is different from what it used to be, isn't it?
>>>>>>> >
>>>>
>>>> [cut]
>>>>
>>>>>
>>>>> Too much questions.
>>>>
>>>> OK
>>>>
>>>>> I switched to CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and tested with
>>>>> the simplified revert-patch of Rafael.
>>>>
>>>> Why do you need the revert patch in the first place?
>>>
>>> I simply wanted to test CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and
>>> keep the rest.
>>
>> But it is not clear to us whether or not your system has regressed
>> with respect to 4.5, which is the whole point of this thread. Do you
>> see a regression here?
>>
>> Jörg in particular is saying that he sees the problem with both
>> performance and powersave settings. What about you?
>
> I have only tested with 4.6-rc1.
> My 4.5 kernel has no CONFIG_X86_MSR=m which is mandatory for turbostat.
>
> With CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y and without your
> simplified revert-patch.
> The values of Bzy_MHz look good for me.
>
> CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y is somehow showing higher
> values than TSC_MHz.
> Not sure if this really make sense if TSC_MHz is a max-value (which I
> don't know it is).
>

I have tested with Linux v4.5 and
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y and CONFIG_X86_MSR=m.

Both turbostat versions (v4.8 from Linux-4.5 and v4.11 from
Linux-4.6-rc1) show higher values in Bzy_MHz than TSC_MHz.

Checking the statement, after 1 minute performance->powersave freq-gov
auto-change on Ubuntu...
I ran approx. 3 minutes...

$ sudo ./turbostat --interval=1 --msr=0x199 --debug <--- turbostat v4.8

...this is the last line...

Core CPU Avg_MHz %Busy Bzy_MHz TSC_MHz MSR 0x199 SMI
CPU%c1 CPU%c3 CPU%c6 CPU%c7 CoreTmp PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6
Pkg%pc7 PkgWatt CorWatt GFXWatt
- - 7 0.40 1754 1596 0x00000000 0
1.31 0.00 0.00 98.29 55 55 0.71 0.00 1.25
93.96 2.62 0.16 0.08
0 0 10 0.63 1616 1596 0x00001700 0
2.01 0.00 0.00 97.36 54 55 0.71 0.00 1.25
93.96 2.62 0.16 0.08
0 1 4 0.27 1566 1596 0x00001700 0 2.37
1 2 11 0.55 2073 1596 0x00001700 0
0.23 0.00 0.00 99.22 55
1 3 2 0.16 1525 1596 0x00001700 0 0.62

Dunno why CPU%c7 and Pkg%pc7 have so high values and what they mean.

See also attached files.

Hope this helps with less confusion.

- Sedat -


Attachments:
dmesg_4.5.0-4-iniza-small.txt (53.16 kB)
config-4.5.0-4-iniza-small (130.46 kB)
turbostat-i-1-msr-0x199-debug_4.5.0-4-iniza-small.txt (86.79 kB)
turbostat-interval-1-msr-0x199-debug_4.5.0-4-iniza-small_turbostat-4-8.txt (25.33 kB)
4.5.0-4-iniza-small.patch (3.48 kB)
Download all attachments

2016-03-31 08:11:01

by Sedat Dilek

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 12:50 AM, Doug Smythies <[email protected]> wrote:
> On 2106.03.30 15:19 Srinivas Pandruvada wrote:
>>>
>>> Please see attached files.
>>>
>> Thanks. Your logs make sense. You have config set to performance mode
>> by default (Which I believe default in all kernel Ubuntu).
>
> Yes, but via a startup script, by default Ubuntu sets the governor
> to powersave 1 minute after boot (or ondemand if acpi-cpufreq).
>

Can you give more and precise informations on this?
script-name etc.

>> So as
>> expected Intel P state was asking for max. So there is no issue here.
>
> Yes, your point is valid, as this does not appear to be a Ubuntu kernel
> configuration file, as the size is not correct.
>
> Should be:
> -rw-r--r-- 1 doug doug 194436 Mar 26 18:59 ../temp-k-git/linux/.config-4.6.0-040600rc1-generic
> Is:
> -rw-r--r-- 1 doug doug 134944 Mar 30 15:21 config-4.6.0-rc1-11-iniza-small
>

Yes, this is the config of my customized Linux-kernel based on Ubuntu
"generic" flavour (details see attached file).

- Sedat -


Attachments:
WHATS-IN-DILEKS-LINUX-KERNEL.txt (5.29 kB)

2016-03-31 14:30:14

by Doug Smythies

[permalink] [raw]
Subject: RE: [intel-pstate driver regression] processor frequency very high even if in idle

On 2016.03.31 01:11 Sedat Dilek wrote:
> On Thu, Mar 31, 2016 at 12:50 AM, Doug Smythies <[email protected]> wrote:
>> On 2106.03.30 15:19 Srinivas Pandruvada wrote:
>>>>
>>>> Please see attached files.
>>>>
>>> Thanks. Your logs make sense. You have config set to performance mode
>>> by default (Which I believe default in all kernel Ubuntu).
>>
>> Yes, but via a startup script, by default Ubuntu sets the governor
>> to powersave 1 minute after boot (or ondemand if acpi-cpufreq).
>>
>
> Can you give more and precise informations on this?
> script-name etc.

The script is /etc/init.d/ondemand
It sleeps for 1 minute and then sets the scaling
governor, based on availability, in the following order:
interactive
ondemand
powersave

See also:

$ ls -l /etc/rc?.d/S06ondemand
lrwxrwxrwx 1 root root 18 Mar 8 09:51 /etc/rc2.d/S06ondemand -> ../init.d/ondemand
lrwxrwxrwx 1 root root 18 Mar 8 09:51 /etc/rc3.d/S06ondemand -> ../init.d/ondemand
lrwxrwxrwx 1 root root 18 Mar 8 09:51 /etc/rc4.d/S06ondemand -> ../init.d/ondemand
lrwxrwxrwx 1 root root 18 Mar 8 09:51 /etc/rc5.d/S06ondemand -> ../init.d/ondemand

>From your other e-mail:

> is somehow showing higher
> values than TSC_MHz.
> Not sure if this really make sense if TSC_MHz is a max-value (which I
> don't know it is).

That is normal, and is turbo mode. Example:

$ sudo turbostat -i 3 --msr=0x199
CPU Avg_MHz %Busy Bzy_MHz TSC_MHz MSR 0x199
- 478 12.53 3798 3413 0x00000000
0 3 0.09 3595 3413 0x00002500
4 1 0.03 3568 3413 0x00001000
1 4 0.11 3649 3413 0x00001200
5 2 0.07 3592 3413 0x00001000
2 3 0.08 3628 3413 0x00001000
6 1 0.03 3546 3413 0x00001000
3 1 0.02 3733 3413 0x00001000
7 3808 99.91 3799 3411 0x00002600

... Doug


2016-04-02 06:12:45

by Sedat Dilek

[permalink] [raw]
Subject: Re: [intel-pstate driver regression] processor frequency very high even if in idle

On Thu, Mar 31, 2016 at 4:30 PM, Doug Smythies <[email protected]> wrote:
> On 2016.03.31 01:11 Sedat Dilek wrote:
>> On Thu, Mar 31, 2016 at 12:50 AM, Doug Smythies <[email protected]> wrote:
>>> On 2106.03.30 15:19 Srinivas Pandruvada wrote:
>>>>>
>>>>> Please see attached files.
>>>>>
>>>> Thanks. Your logs make sense. You have config set to performance mode
>>>> by default (Which I believe default in all kernel Ubuntu).
>>>
>>> Yes, but via a startup script, by default Ubuntu sets the governor
>>> to powersave 1 minute after boot (or ondemand if acpi-cpufreq).
>>>
>>
>> Can you give more and precise informations on this?
>> script-name etc.
>
> The script is /etc/init.d/ondemand
> It sleeps for 1 minute and then sets the scaling
> governor, based on availability, in the following order:
> interactive
> ondemand
> powersave
>

Thanks for these informations.

$ dpkg -S /etc/init.d/ondemand
initscripts: /etc/init.d/ondemand

For the followers...

[ /etc/init.d/ondemand ]

#! /bin/sh
### BEGIN INIT INFO
# Provides: ondemand
# Required-Start: $remote_fs $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Set the CPU Frequency Scaling governor to "ondemand"
### END INIT INFO


PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

case "$1" in
start)
start-stop-daemon --start --background --exec
/etc/init.d/ondemand -- background
;;
background)
sleep 60 # probably enough time for desktop login

for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
do
[ -f $CPUFREQ ] || continue
echo -n ondemand > $CPUFREQ
done
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac

[ /etc/init.d/ondemand ]

Will check...

$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

> See also:
>
> $ ls -l /etc/rc?.d/S06ondemand
> lrwxrwxrwx 1 root root 18 Mar 8 09:51 /etc/rc2.d/S06ondemand -> ../init.d/ondemand
> lrwxrwxrwx 1 root root 18 Mar 8 09:51 /etc/rc3.d/S06ondemand -> ../init.d/ondemand
> lrwxrwxrwx 1 root root 18 Mar 8 09:51 /etc/rc4.d/S06ondemand -> ../init.d/ondemand
> lrwxrwxrwx 1 root root 18 Mar 8 09:51 /etc/rc5.d/S06ondemand -> ../init.d/ondemand
>

Here it is S99...

$ LC_ALL=C ls -l /etc/rc?.d/S*ondemand
lrwxrwxrwx 1 root root 18 Mar 27 2012 /etc/rc2.d/S99ondemand ->
../init.d/ondemand
lrwxrwxrwx 1 root root 18 Mar 27 2012 /etc/rc3.d/S99ondemand ->
../init.d/ondemand
lrwxrwxrwx 1 root root 18 Mar 27 2012 /etc/rc4.d/S99ondemand ->
../init.d/ondemand
lrwxrwxrwx 1 root root 18 Mar 27 2012 /etc/rc5.d/S99ondemand ->
../init.d/ondemand

> From your other e-mail:
>
>> is somehow showing higher
>> values than TSC_MHz.
>> Not sure if this really make sense if TSC_MHz is a max-value (which I
>> don't know it is).
>
> That is normal, and is turbo mode. Example:
>
> $ sudo turbostat -i 3 --msr=0x199
> CPU Avg_MHz %Busy Bzy_MHz TSC_MHz MSR 0x199
> - 478 12.53 3798 3413 0x00000000
> 0 3 0.09 3595 3413 0x00002500
> 4 1 0.03 3568 3413 0x00001000
> 1 4 0.11 3649 3413 0x00001200
> 5 2 0.07 3592 3413 0x00001000
> 2 3 0.08 3628 3413 0x00001000
> 6 1 0.03 3546 3413 0x00001000
> 3 1 0.02 3733 3413 0x00001000
> 7 3808 99.91 3799 3411 0x00002600
>

Ah, OK.

Thanks again.
That helped me.

I am trying CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y from
linux-pm.git#linux-next out of curiosity...

$ ./scripts/diffconfig /boot/config-$(uname -r) .config
CPU_FREQ_DEFAULT_GOV_PERFORMANCE y -> n
+CPU_FREQ_DEFAULT_GOV_SCHEDUTIL y
+CPU_FREQ_GOV_ATTR_SET y
+CPU_FREQ_GOV_SCHEDUTIL y

...will report.

- sed@ -

[1] https://en.wikipedia.org/wiki/Curiosity_killed_the_cat