[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210902012206.cm6flytlp63c2h5v@oracle.com>
Date: Wed, 1 Sep 2021 21:22:06 -0400
From: Daniel Jordan <daniel.m.jordan@...cle.com>
To: Josh Don <joshdon@...gle.com>
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@...r.kernel.org
Subject: Re: [PATCH v3 1/4] sched: cgroup SCHED_IDLE support
On Thu, Aug 19, 2021 at 06:04:00PM -0700, Josh Don wrote:
> +static int se_is_idle(struct sched_entity *se)
> +{
> + return 0;
> +}
I'm thinking !FAIR_GROUP_SCHED is a rare thing to behold? So not a big
deal, but I think this wants to be
return task_has_idle_policy(task_of(se));
so buddies aren't set for SCHED_IDLE.
> static void set_last_buddy(struct sched_entity *se)
> {
> - if (entity_is_task(se) && unlikely(task_has_idle_policy(task_of(se))))
> - return;
> -
> for_each_sched_entity(se) {
> if (SCHED_WARN_ON(!se->on_rq))
> return;
> + if (se_is_idle(se))
> + return;
> cfs_rq_of(se)->last = se;
> }
> }
>
> static void set_next_buddy(struct sched_entity *se)
> {
> - if (entity_is_task(se) && unlikely(task_has_idle_policy(task_of(se))))
> - return;
> -
> for_each_sched_entity(se) {
> if (SCHED_WARN_ON(!se->on_rq))
> return;
> + if (se_is_idle(se))
> + return;
> cfs_rq_of(se)->next = se;
> }
> }
Powered by blists - more mailing lists