Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1510917
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking |
| Date | 2016-10-28 10:00 +0200 |
| Message-ID | <sxaeZ-5mE-21@gated-at.bofh.it> (permalink) |
| References | <sx9Ch-59A-3@gated-at.bofh.it> <sx9Ch-59A-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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?
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking Vikram Mulukutla <markivx@codeaurora.org> - 2016-10-28 09:20 +0200
Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking Peter Zijlstra <peterz@infradead.org> - 2016-10-28 09:40 +0200
Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking Peter Zijlstra <peterz@infradead.org> - 2016-10-28 09:50 +0200
Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking Vikram Mulukutla <markivx@codeaurora.org> - 2016-10-28 10:10 +0200
Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking Peter Zijlstra <peterz@infradead.org> - 2016-10-28 09:50 +0200
Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking Vikram Mulukutla <markivx@codeaurora.org> - 2016-10-28 10:00 +0200
Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking Peter Zijlstra <peterz@infradead.org> - 2016-10-28 10:00 +0200
csiph-web