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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170522112727.GI6510@vireshk-i7>
Date:   Mon, 22 May 2017 16:57:27 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Leo Yan <leo.yan@...aro.org>
Cc:     Brendan Jackman <brendan.jackman@....com>,
        linaro-kernel@...ts.linaro.org, Rafael Wysocki <rjw@...ysocki.net>,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        Amit Kucheria <amit.kucheria@...aro.org>
Subject: Re: [PATCH] cpufreq: dt: Set default policy->transition_delay_ns

On 22-05-17, 19:17, Leo Yan wrote:
> This afternoon Amit pointed me for this patch, should fix as below?
> Otherwise it seems directly assign the same value from unit 'ns' to
> 'us' but without any value conversion.
> 
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index 76877a6..dcc90fc 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -538,7 +538,7 @@ static int sugov_init(struct cpufreq_policy *policy)
>                 unsigned int lat;
>  
>                 tunables->rate_limit_us = LATENCY_MULTIPLIER;
> -               lat = policy->cpuinfo.transition_latency / NSEC_PER_USEC;
> +               lat = policy->cpuinfo.transition_latency / NSEC_PER_MSEC;
>                 if (lat)
>                         tunables->rate_limit_us *= lat;
>         }

I will let Rafael comment in as well. NSEC_PER_USEC is used in the
earlier governors as well (ondemand/conservative) in exactly the same
way as schedutil is using.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ