[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200117114758.GB219309@google.com>
Date: Fri, 17 Jan 2020 11:47:58 +0000
From: Quentin Perret <qperret@...gle.com>
To: Thara Gopinath <thara.gopinath@...aro.org>
Cc: mingo@...hat.com, peterz@...radead.org, ionela.voinescu@....com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rui.zhang@...el.com, daniel.lezcano@...aro.org,
viresh.kumar@...aro.org, linux-kernel@...r.kernel.org,
amit.kachhap@...il.com, javi.merino@...nel.org,
kernel-team@...roid.com
Subject: Re: [Patch v8 7/7] sched/fair: Enable tuning of decay period
On Tuesday 14 Jan 2020 at 14:57:39 (-0500), Thara Gopinath wrote:
> +static int __init setup_sched_thermal_decay_shift(char *str)
> +{
> + int _shift;
> +
> + if (kstrtoint(str, 0, &_shift))
> + pr_warn("Unable to set scheduler thermal pressure decay shift parameter\n");
Nit: looking at kstrtoint() it seems that _shift will be left unmodified
upon failure. To avoid feeding a random value to clamp() below, perhaps
initialize _shift to 0 ?
> + sched_thermal_decay_shift = clamp(_shift, 0, 10);
> + return 1;
> +}
Thanks,
Quentin
Powered by blists - more mailing lists