[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABk29NvH6_JoLydcrJf+yiaasGUbNEjzKdPjZxnWdrAFboJdsg@mail.gmail.com>
Date: Mon, 23 Aug 2021 10:29:53 -0700
From: Josh Don <joshdon@...gle.com>
To: Tao Zhou <tao.zhou@...ux.dev>
Cc: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Paul Turner <pjt@...gle.com>,
Oleg Rombakh <olegrom@...gle.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Steve Sistare <steven.sistare@...cle.com>,
Tejun Heo <tj@...nel.org>, Rik van Riel <riel@...riel.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/4] sched: cgroup SCHED_IDLE support
Hi Tao,
On Fri, Aug 20, 2021 at 1:38 AM Tao Zhou <tao.zhou@...ux.dev> wrote:
[snip]
> > #ifdef CONFIG_SMP
> > extern void set_task_rq_fair(struct sched_entity *se,
> > struct cfs_rq *prev, struct cfs_rq *next);
> > @@ -601,6 +606,9 @@ struct cfs_rq {
> > struct list_head leaf_cfs_rq_list;
> > struct task_group *tg; /* group that "owns" this runqueue */
> >
> > + /* Locally cached copy of our task_group's idle value */
> > + int idle;
> > +
> > #ifdef CONFIG_CFS_BANDWIDTH
> > int runtime_enabled;
> > s64 runtime_remaining;
> > --
> > 2.33.0.rc2.250.ged5fa647cd-goog
> >
>
> Cfs_rq and tg define @idle with int type.
> In sched_group_set_idle(..., long idle), @idle is long type.
> Use int instead.
>
> But, you filter idle value:
>
> if (idle < 0 || idle > 1)
> return -EINVAL;
>
> So, no effect here.. Just @idle can use 4 bytes.
>
>
>
> Thanks,
> Tao
The use of 'long' there is because the input from the cgroup
interface is a 64 bit value.
- Josh
Powered by blists - more mailing lists