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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ0PZbRarw8hSmkUZydn79czJj7HK1nc2G8egQdabDRVHE7W_w@mail.gmail.com>
Date:   Tue, 17 Oct 2017 23:43:00 +0900
From:   MyungJoo Ham <myungjoo.ham@...sung.com>
To:     Chanwoo Choi <cw00.choi@...sung.com>
Cc:     Kyungmin Park <kyungmin.park@...sung.com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        chanwoo@...nel.org,
        대인기 <inki.dae@...sung.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v4 3/8] PM / devfreq: Use the available min/max frequency

On Fri, Oct 13, 2017 at 4:48 PM, Chanwoo Choi <cw00.choi@...sung.com> wrote:
> The commit a76caf55e5b35 ("thermal: Add devfreq cooling") is able
> to disable OPP as a cooling device. In result, both update_devfreq()
> and {min|max}_freq_show() have to consider the 'opp->available'
> status of each OPP.
>
> So, this patch adds the 'scaling_{min|max}_freq' to struct devfreq
> in order to indicate the available mininum and maximum frequency
> by adjusting OPP interface such as dev_pm_opp_{disable|enable}().
> The 'scaling_{min|max}_freq' are used for on both update_devfreq()
> and {min|max}_freq_show().
>
> Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
> ---
>  drivers/devfreq/devfreq.c | 36 ++++++++++++++++++++++++++++--------
>  include/linux/devfreq.h   |  4 ++++
>  2 files changed, 32 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index b6ba24e5db0d..9de013ffeb67 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
[]
> @@ -494,6 +499,19 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
>         int ret;
>
>         mutex_lock(&devfreq->lock);
> +
> +       devfreq->scaling_min_freq = find_available_min_freq(devfreq);
> +       if (!devfreq->scaling_min_freq) {
> +               mutex_unlock(&devfreq->lock);
> +               return -EINVAL;
> +       }
> +
> +       devfreq->scaling_max_freq = find_available_max_freq(devfreq);
> +       if (!devfreq->max_freq) {

1. s/max_freq/scaling/max_freq/ ??

2. what if thermal is not active or has never triggered any event and
the user has never stated max/min? (making scaling_*_freq zero)

> +               mutex_unlock(&devfreq->lock);
> +               return -EINVAL;
> +       }
> +
>         ret = update_devfreq(devfreq);
>         mutex_unlock(&devfreq->lock);
>



-- 
MyungJoo Ham, Ph.D.
S/W Center, Samsung Electronics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ