[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190510065531.GF2623@hirez.programming.kicks-ass.net>
Date: Fri, 10 May 2019 08:55:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>, tkjos@...gle.com,
Daniel Lezcano <daniel.lezcano@...aro.org>,
quentin.perret@...aro.org, chris.redpath@....com,
Dietmar.Eggemann@....com, linux-kernel@...r.kernel.org
Subject: Re: [RFC V2 1/2] sched: Start tracking SCHED_IDLE tasks count in
cfs_rq
On Thu, Apr 25, 2019 at 03:07:39PM +0530, Viresh Kumar wrote:
> @@ -5166,6 +5170,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
> {
> struct cfs_rq *cfs_rq;
> struct sched_entity *se = &p->se;
> + int idle_h_nr_running = unlikely(task_has_idle_policy(p)) ? 1 : 0;
>
> /*
> * The code below (indirectly) updates schedutil which looks at
> @@ -5266,6 +5273,7 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
> struct cfs_rq *cfs_rq;
> struct sched_entity *se = &p->se;
> int task_sleep = flags & DEQUEUE_SLEEP;
> + int idle_h_nr_running = unlikely(task_has_idle_policy(p)) ? 1 : 0;
>
> for_each_sched_entity(se) {
> cfs_rq = cfs_rq_of(se);
That's a completely pointless branch there (and I suspect the compiler
will see that too), just write:
int idle_h_nr_running = task_has_idle_policy(p);
Powered by blists - more mailing lists