[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161028075225.GV3102@twins.programming.kicks-ass.net>
Date: Fri, 28 Oct 2016 09:52:25 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Vikram Mulukutla <markivx@...eaurora.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Srivatsa Vaddagiri <vatsa@...eaurora.org>,
Steve Muckle <steve.muckle@...aro.org>,
Olav Haugan <ohaugan@...eaurora.org>,
Syed Rameez Mustafa <rameezmustafa@...eaurora.org>,
Joonwoo Park <joonwoop@...eaurora.org>,
Pavankumar Kondeti <pkondeti@...eaurora.org>,
Saravana Kannan <skannan@...eaurora.org>,
Bryan Huntsman <bryanh@...eaurora.org>,
Juri Lelli <juri.lelli@....com>,
Morten Rasmussen <morten.rasmussen@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Chris Redpath <chris.redpath@....com>,
Robin Randhawa <robin.randhawa@....com>,
Patrick Bellasi <patrick.bellasi@....com>,
Todd Kjos <tkjos@...gle.com>,
Srinath Sridharan <srinathsr@...gle.com>,
Andres Oportus <andresoportus@...gle.com>,
Leo Yan <leo.yan@...aro.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Vikram Mulukutla <markivx@...eauorora.org>
Subject: Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization
Tracking
On Fri, Oct 28, 2016 at 12:10:41AM -0700, Vikram Mulukutla wrote:
> +static int account_cpu_busy_time(struct rq *rq, struct task_struct *p,
> + u64 irqtime, int event)
> +{
> + if (is_idle_task(p)) {
> + /* TASK_WAKE && TASK_MIGRATE is not possible on idle task! */
> + if (event == PICK_NEXT_TASK)
> + return 0;
> +
> + /* PUT_PREV_TASK, TASK_UPDATE && IRQ_UPDATE are left */
> + return irqtime || cpu_is_waiting_on_io(rq);
> + }
> +
> + if (event == TASK_WAKE)
> + return 0;
> +
> + if (event == PUT_PREV_TASK || event == IRQ_UPDATE ||
> + event == TASK_UPDATE)
> + return 1;
> +
> + /* Only TASK_MIGRATE && PICK_NEXT_TASK left */
> + return walt_freq_account_wait_time;
> +}
switch() wasn't an option?
Powered by blists - more mailing lists