Re: [RFT][PATCH v2 1/2] PM / domains: Rework governor code to be more consistent

From: Rafael J. Wysocki
Date: Mon Nov 06 2017 - 18:07:10 EST


On Mon, Nov 6, 2017 at 3:38 PM, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
> [...]
>
>>>>
>>>> So I guess I'll simply evaluate dev_pm_qos_read_value(dev) if
>>>> subsys_data or subsys_data->domain_data is not there.
>>>
>>> Yes.
>>>
>>> However, if it returns -1, what value should you pick? 0?
>>
>> Without the second patch, -1 will just mean "no suspend", so the
>> parent cannot be suspended too, but that should just work AFAICS
>> (effective_constraint_ns may be -1 too at that point, if present).
>
> I am fine with whatever policy you pick.
>
> However, I suspect it may be more tricky respecting a -1 (no suspend),
> because this means dev_update_qos_constraint() then may continue to
> return a negative value, which you changed the caller,
> default_suspend_ok(), to not cope with.

Oh, I just need to restore the constraint_ns < 0 check I dropped,
because it was never going to trigger.

Thanks,
Rafael