lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8dadc395-e7f4-9dcc-b484-60c119063007@gmail.com>
Date:   Fri, 10 Sep 2021 14:24:38 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Viresh Kumar <viresh.kumar@...aro.org>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Linux PM <linux-pm@...r.kernel.org>,
        Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Rajendra Nayak <rnayak@...eaurora.org>,
        Stephan Gerhold <stephan@...hold.net>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] PM: domains: Add a ->dev_get_performance_state()
 callback to genpd

09.09.2021 17:39, Ulf Hansson пишет:
> On Thu, 9 Sept 2021 at 15:48, Dmitry Osipenko <digetx@...il.com> wrote:
>>
>> 07.09.2021 12:57, Ulf Hansson пишет:
>>> I don't mind extending the genpd API, but it needs to serve a good purpose.
>>>
>>> As I said earlier, genpd doesn't know nor can control how the consumer
>>> driver deploys runtime PM. Unfortunately, that also includes genpd
>>> providers, as the behavior isn't a platform or PM domain specific
>>> thing. This means genpd needs to be generic enough so it works for all
>>> cases.
>>>
>>> In the $subject patch, we rely on the pm_runtime_suspended() check in
>>> dev_pm_genpd_set_performance_state(), which should work for all cases,
>>> even if it may be sub-optimal for some scenarios.
>>>
>>> Note that, in the approach your suggested [1],
>>> pm_runtime_status_suspended() is used instead. This doesn't work when
>>> a consumer driver doesn't enable runtime PM - or calls
>>> pm_runtime_set_active() during ->probe(), because
>>> genpd_runtime_resume() won't be invoked to restore the gpd->rpm_state.
>>>
>>> That said, I wouldn't mind to simply skip adding the
>>> ->dev_get_performance_state() all together, if that is what you
>>> prefer? In this way, it becomes the responsibility for the consumer
>>> driver to do right thing, with the cost of some boilerplate code added
>>> in its ->probe() routine.
>>
>> Until a day ago, it wasn't clear to me that consumer drivers now can set
>> up rpm_pstate during probe(), which is a cleaner solution that works
>> well. So let's skip adding the questionable ->dev_get_performance_state().
>>
>> The boilerplate code in the probe() is minimal in comparison to a
>> previous variant with the state-syncing done by rpm-resume callbacks of
>> consumer drivers, it's good enough.
> 
> Alright, that sounds good to me as well.
> 
> I am happy to help with review of the consumer driver changes, just
> keep me posted.

Thank you and Viresh for the help, very appreciate it!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ