linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Doug Smythies" <dsmythies@telus.net>
To: "'Rafael J. Wysocki'" <rjw@rjwysocki.net>
Cc: "'LKML'" <linux-kernel@vger.kernel.org>,
	"'Srinivas Pandruvada'" <srinivas.pandruvada@linux.intel.com>,
	"'Peter Zijlstra'" <peterz@infradead.org>,
	"'Daniel Lezcano'" <daniel.lezcano@linaro.org>,
	"'Linux PM'" <linux-pm@vger.kernel.org>
Subject: RE: [PATCH 0/4] cpuidle: teo: Fix issues related to disabled idle states
Date: Fri, 18 Oct 2019 00:21:27 -0700	[thread overview]
Message-ID: <000901d58584$a961bdb0$fc253910$@net> (raw)
In-Reply-To: <60416800.X4hXmAfbqi@kreacher>

On 2019.10.10 Rafael J. Wysocki wrote:

> There are a few issues related to the handling of disabled idle states in the
> TEO (Timer-Events-Oriented) cpuidle governor which are addressed by this
> series.
>
> The application of the entire series is exactly equivalent to the testing patch
> at https://lore.kernel.org/lkml/3490479.2dnHFFeJIp@kreacher/ , but IMO it is
> cleaner to split the changes into smaller patches which also allows them to
> be explained more accurately.

Hi,

I have re-tested and continued testing using this 4 patch set.

Summary: So far, everything is fine.

Some, but not all, detail:

Reference kernel: 5.4-rc2 "stock"
Test kernel: 5.4-rc2 + this 4 patch set "rjw-4"

Test 1: Where I simply coded, to automate, my best use
case example:

This is an idle state 4 disabled test.
The max entries column is entries and exits for
idle state 0 over the test sample interval
(15 seconds in this case).

stock kernel:

idle-doug01 : begin ...

Per CPU PASS/FAIL : Totals: fail rate: max entries:
 0 1 2 3 4 5 6 7  :       : (percent):            :
 . . F . . . F .  :      8 : 25.0000 :      69939
 . . F . . . F .  :     16 : 25.0000 :      69938
 . . F . . . F .  :     24 : 25.0000 :      70126
...
 . . . . . . F F  :   1928 : 30.8610 :      66530
 . . . . . . F F  :   1936 : 30.8368 :      68451
 . . . . . . F F  :   1944 : 30.8128 :      68643
 . . . . . . F F  :   1952 : 30.7889 :      68645
 . . . . . . F F  :   1960 : 30.7653 :      68152
 . . . . . . F F  :   1968 : 30.7419 :      67145
 . . . . . . F F  :   1976 : 30.7186 :      67349
 . . . . . . F F  :   1984 : 30.6956 :      68481
 . . . . . . F F  :   1992 : 30.6727 :      67394
 . . . . . . F F  :   2000 : 30.6500 :      68645
^C --- SIGINT (^C) detected. Terminate gracefully, saving the sample data...
 . . . . . . F F  :   2008 : 30.6275 :      29010

Summary: Total Tests:   2008 : Total Fails:    615 : Fail rate (percent): 30.6275 : Per CPU:
CPU00:      0, CPU01:      0, CPU02:     12, CPU03:      0, CPU04:    152, CPU05:     43, CPU06:    197, CPU07:    211,

idle-doug01 : end ...

rjw-4 kernel:

idle-doug01 : begin ...

Per CPU PASS/FAIL : Totals: fail rate: max entries:
 0 1 2 3 4 5 6 7  :       : (percent):            :
 . . . . . . . .  :      8 :  0.0000 :          3
 . . . . . . . .  :     16 :  0.0000 :          7
 . . . . . . . .  :     24 :  0.0000 :         10
 . . . . . . . .  :     32 :  0.0000 :         10
 . . . . . . . .  :     40 :  0.0000 :         23
 . . . . . . . .  :     48 :  0.0000 :         23
 . . . . . . . .  :     56 :  0.0000 :          1
 . . . . . . . .  :     64 :  0.0000 :          1
 . . . . . . . .  :     72 :  0.0000 :          0
 . . . . . . . .  :     80 :  0.0000 :          0
 . . . . . . . .  :     88 :  0.0000 :          1
 . . . . . . . .  :     96 :  0.0000 :          1
 . . . . . . . .  :    104 :  0.0000 :          0
 . . . . . . . .  :    112 :  0.0000 :          0
 . . . . . . . .  :    120 :  0.0000 :          1
 . . . . . . . .  :    128 :  0.0000 :          2
 . . . . . . . .  :    136 :  0.0000 :          2
 . . . . . . . .  :    144 :  0.0000 :          3
 . . . . . . . .  :    152 :  0.0000 :          3
 . . . . . . . .  :    160 :  0.0000 :          4
 . . . . . . . .  :    168 :  0.0000 :          4
 . . . . . . . .  :    176 :  0.0000 :          6
 . . . . . . . .  :    184 :  0.0000 :          3
 . . . . . . . .  :    192 :  0.0000 :          4
...
 . . . . . . . .  :  11480 :  0.0000 :          5
 . . . . . . . .  :  11488 :  0.0000 :          4
 . . . . . . . .  :  11496 :  0.0000 :          6
 . . . . . . . .  :  11504 :  0.0000 :          8
 . . . . . . . .  :  11512 :  0.0000 :          5
 . . . . . . . .  :  11520 :  0.0000 :          4
 . . . . . . . .  :  11528 :  0.0000 :          4
 . . . . . . . .  :  11536 :  0.0000 :          3
 . . . . . . . .  :  11544 :  0.0000 :          2
 . . . . . . . .  :  11552 :  0.0000 :          5
 . . . . . . . .  :  11560 :  0.0000 :          3
 . . . . . . . .  :  11568 :  0.0000 :          3
^C --- SIGINT (^C) detected. Terminate gracefully, saving the sample data...
 . . . . . . . .  :  11576 :  0.0000 :          1

Summary: Total Tests:  11576 : Total Fails:      0 : Fail rate (percent):  0.0000 : Per CPU:
CPU00:      0, CPU01:      0, CPU02:      0, CPU03:      0, CPU04:      0, CPU05:      0, CPU06:      0, CPU07:      0,

idle-doug01 : end ...

Test 2: Have a look at all idle state enabled/disabled combinations.
This test is not very good, and only looks at processor package power.
Particularly for idle state 1, see Note 1 below.
But it's better than nothing.

stock kernel:

idle-disable-enable : begin ...

Idle State:  Per test PASS/FAIL  :     Power (Watts)    :
4 3 2 1 0 :                      :  Expected : Max diff :
0 0 0 0 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 0 0 0 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 0 0 1 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 0 0 1 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 0 1 0 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 0 1 0 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 0 1 1 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 0 1 1 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 1 0 0 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 1 0 0 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 1 0 1 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 1 0 1 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 1 1 0 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 1 1 0 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 1 1 1 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
0 1 1 1 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     3.7 :    0.2
1 0 0 0 0 : FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL :     4.9 :   17.0
1 0 0 0 1 : FAIL PASS PASS PASS PASS PASS PASS PASS :     4.9 :    1.6
1 0 0 1 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     4.9 :    0.8
1 0 0 1 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     4.9 :    0.8
1 0 1 0 0 : PASS FAIL FAIL FAIL FAIL FAIL FAIL FAIL :     4.9 :   19.9
1 0 1 0 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     4.9 :    0.9
1 0 1 1 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     4.9 :    0.8
1 0 1 1 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     4.9 :    0.8
1 1 0 0 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     8.7 :    0.7
1 1 0 0 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     8.7 :    0.7
1 1 0 1 0 : PASS PASS PASS PASS PASS PASS PASS PASS :     8.7 :    0.7
1 1 0 1 1 : PASS PASS PASS PASS PASS PASS PASS PASS :     8.7 :    0.7
1 1 1 0 0 : FAIL PASS PASS PASS PASS PASS PASS PASS :     9.6 :    2.5
1 1 1 0 1 : FAIL PASS PASS PASS PASS PASS PASS PASS :     9.6 :   11.3 <<< Note 1.
1 1 1 1 0 : PASS PASS PASS PASS PASS PASS PASS PASS :    52.0 :    1.0
1 1 1 1 1 : PASS PASS PASS PASS PASS PASS PASS PASS :    52.0 :    1.4

idle-disable-enable : end ...

rjw-4 kernel:

Note: Reduced to 3 tests per combination. 8 seconds per sample.

idle-disable-enable : begin ...

Idle State:  Per test PASS/FAIL  :     Power (Watts)    :
4 3 2 1 0 :                      :  Expected : Max diff :
0 0 0 0 0 : PASS PASS PASS :     3.7 :    0.2
0 0 0 0 1 : PASS PASS PASS :     3.7 :    0.2
0 0 0 1 0 : PASS PASS PASS :     3.7 :    0.2
0 0 0 1 1 : PASS PASS PASS :     3.7 :    0.2
0 0 1 0 0 : PASS PASS PASS :     3.7 :    0.3
0 0 1 0 1 : PASS PASS PASS :     3.7 :    0.2
0 0 1 1 0 : PASS PASS PASS :     3.7 :    0.2
0 0 1 1 1 : PASS PASS PASS :     3.7 :    0.3
0 1 0 0 0 : PASS PASS PASS :     3.7 :    0.2
0 1 0 0 1 : PASS PASS PASS :     3.7 :    0.3
0 1 0 1 0 : PASS PASS PASS :     3.7 :    0.3
0 1 0 1 1 : PASS PASS PASS :     3.7 :    0.2
0 1 1 0 0 : PASS PASS PASS :     3.7 :    0.2
0 1 1 0 1 : PASS PASS PASS :     3.7 :    0.2
0 1 1 1 0 : PASS PASS PASS :     3.7 :    0.3
0 1 1 1 1 : PASS PASS PASS :     3.7 :    0.3
1 0 0 0 0 : PASS PASS PASS :     4.9 :    0.8
1 0 0 0 1 : PASS PASS PASS :     4.9 :    0.8
1 0 0 1 0 : PASS PASS PASS :     4.9 :    0.8
1 0 0 1 1 : PASS PASS PASS :     4.9 :    0.8
1 0 1 0 0 : PASS PASS PASS :     4.9 :    0.8
1 0 1 0 1 : PASS PASS PASS :     4.9 :    0.8
1 0 1 1 0 : PASS PASS PASS :     4.9 :    0.8
1 0 1 1 1 : PASS PASS PASS :     4.9 :    0.8
1 1 0 0 0 : PASS PASS PASS :     8.7 :    0.8
1 1 0 0 1 : PASS PASS PASS :     8.7 :    0.8
1 1 0 1 0 : PASS PASS PASS :     8.7 :    0.9
1 1 0 1 1 : PASS PASS PASS :     8.7 :    0.9
1 1 1 0 0 : PASS PASS PASS :     9.6 :    1.7
1 1 1 0 1 : FAIL PASS PASS :     9.6 :    2.1  <<< Note 1.
1 1 1 1 0 : PASS PASS PASS :    52.0 :    0.5
1 1 1 1 1 : PASS PASS PASS :    52.0 :    1.0

idle-disable-enable : end ...

Note 1:
The processor package power used in idle state 1 is
a strong function of the current p-state setting:
p-state 16 (lowest): 8.8 watts
p-state 38 (highest): 21.9 watts
When the system load goes to idle during this test,
it can take on the order of 10s of seconds for the
intel-pstate driver to request low p-states for
all CPUs. If there is an issue here, it is a subject
for another day.

... Doug



      parent reply	other threads:[~2019-10-18  7:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 21:30 [PATCH 0/4] cpuidle: teo: Fix issues related to disabled idle states Rafael J. Wysocki
2019-10-10 21:32 ` [PATCH 1/4] cpuidle: teo: Ignore disabled idle states that are too deep Rafael J. Wysocki
2019-11-05 19:50   ` Doug Smythies
2019-10-10 21:32 ` [PATCH 2/4] cpuidle: teo: Rename local variable in teo_select() Rafael J. Wysocki
2019-11-05 19:50   ` Doug Smythies
2019-10-10 21:36 ` [PATCH 3/4] cpuidle: teo: Consider hits and misses metrics of disabled states Rafael J. Wysocki
2019-11-05 19:50   ` Doug Smythies
2019-10-10 21:37 ` [PATCH 4/4] cpuidle: teo: Fix "early hits" handling for disabled idle states Rafael J. Wysocki
2019-11-05 19:50   ` Doug Smythies
2019-11-05 22:15     ` Rafael J. Wysocki
2019-10-18  7:21 ` Doug Smythies [this message]

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='000901d58584$a961bdb0$fc253910$@net' \
    --to=dsmythies@telus.net \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=srinivas.pandruvada@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).