[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180723151724.GE2683@e110439-lin>
Date: Mon, 23 Jul 2018 16:17:24 +0100
From: Patrick Bellasi <patrick.bellasi@....com>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Tejun Heo <tj@...nel.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Paul Turner <pjt@...gle.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Morten Rasmussen <morten.rasmussen@....com>,
Juri Lelli <juri.lelli@...hat.com>,
Todd Kjos <tkjos@...gle.com>,
Joel Fernandes <joelaf@...gle.com>,
Steve Muckle <smuckle@...gle.com>
Subject: Re: [PATCH v2 08/12] sched/core: uclamp: extend cpu's cgroup
controller
On 20-Jul 19:37, Suren Baghdasaryan wrote:
> On Mon, Jul 16, 2018 at 1:29 AM, Patrick Bellasi
> <patrick.bellasi@....com> wrote:
[...]
> > +#ifdef CONFIG_UCLAMP_TASK_GROUP
> > +static int cpu_util_min_write_u64(struct cgroup_subsys_state *css,
> > + struct cftype *cftype, u64 min_value)
> > +{
> > + struct task_group *tg;
> > + int ret = -EINVAL;
> > +
> > + if (min_value > SCHED_CAPACITY_SCALE)
> > + return -ERANGE;
> > +
> > + mutex_lock(&uclamp_mutex);
> > + rcu_read_lock();
> > +
> > + tg = css_tg(css);
> > + if (tg->uclamp[UCLAMP_MIN].value == min_value) {
> > + ret = 0;
> > + goto out;
> > + }
> > + if (tg->uclamp[UCLAMP_MAX].value < min_value)
> > + goto out;
> > +
>
> + tg->uclamp[UCLAMP_MIN].value = min_value;
> + ret = 0;
>
> Are these assignments missing or am I missing something? Same for
> cpu_util_max_write_u64().
They are introduced in the following patch, to keep this one focus
just on CGroups integration.
I'm also returning -EINVAL at this stage since, with just this patch
in, we are not really providing any good service to user-space, i.e.
it's like clamp groups not being available...
Maybe I can call this out better in the change log ;)
> > +out:
> > + rcu_read_unlock();
> > + mutex_unlock(&uclamp_mutex);
> > +
> > + return ret;
> > +}
[...]
--
#include <best/regards.h>
Patrick Bellasi
Powered by blists - more mailing lists