lkml.org 
[lkml]   [2016]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v3 2/6] Improve the tracking of active utilisation
On Mon, Oct 24, 2016 at 04:06:34PM +0200, Luca Abeni wrote:
> @@ -1074,6 +1161,14 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
> }
> rcu_read_unlock();
>
> + rq = task_rq(p);
> + raw_spin_lock(&rq->lock);
> + if (hrtimer_active(&p->dl.inactive_timer)) {
> + sub_running_bw(&p->dl, &rq->dl);
> + hrtimer_try_to_cancel(&p->dl.inactive_timer);
> + }
> + raw_spin_unlock(&rq->lock);

Its a bit sad having to take rq->lock here...

Also, what happens when hrtimer_try_to_cancel() fails?

> +
> out:
> return cpu;
> }

\
 
 \ /
  Last update: 2016-11-18 16:48    [W:0.256 / U:1.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site