Re: [PATCH] PM / QoS: Fix default runtime_pm device resume latency

From: Geert Uytterhoeven
Date: Tue Oct 31 2017 - 09:09:27 EST


Hi Rafael, Tero,

On Tue, Oct 31, 2017 at 12:27 AM, Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> wrote:
> On Monday, October 30, 2017 11:19:08 AM CET Rafael J. Wysocki wrote:
>> On Mon, Oct 30, 2017 at 8:10 AM, Tero Kristo <t-kristo@xxxxxx> wrote:
>> > The recent change to the PM QoS framework to introduce a proper
>> > no constraint value overlooked to handle the devices which don't
>> > implement PM QoS OPS. Runtime PM is one of the more severely
>> > impacted subsystems, failing every attempt to runtime suspend
>> > a device. This leads into some nasty second level issues like
>> > probe failures and increased power consumption among other things.
>>
>> Oh, that's bad.
>>
>> Sorry about breaking it and thanks for the fix!
>>
>> > Fix this by adding a proper return value for devices that don't
>> > implement PM QoS implicitly.
>> >
>> > Fixes: 0cc2b4e5a020 ("PM / QoS: Fix device resume latency PM QoS")
>> > Signed-off-by: Tero Kristo <t-kristo@xxxxxx>
>> > Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>>
>> Applied.
>
> And pushed to Linus.

I'm afraid it is not sufficient.

Commit 0cc2b4e5a020fc7f ("PM / QoS: Fix device resume latency PM QoS")
introduced two issues on Renesas platforms:
1. After boot up, many devices have changed their state from "suspended"
to "active", according to /sys/kernel/debug/pm_genpd/pm_genpd_summary
(comparing that file across boots is one of my standard tests).
Interestingly, doing a system suspend/resume cycle restores their state
to "suspended".

2. During system suspend, the following warning is printed on
r8a7791/koelsch:

i2c-rcar e6530000.i2c: runtime PM trying to suspend device but
active child

Commit 2a9a86d5c81389cd ("PM / QoS: Fix default runtime_pm device resume
latency") fixes the second issue, but not the first.

Reverting commits 2a9a86d5c81389cd ("PM / QoS: Fix default runtime_pm
device resume latency") and 0cc2b4e5a020fc7f ("PM / QoS: Fix device resume
latency PM QoS") fixes both.

Do you have a clue?
Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds