lkml.org 
[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 06/16] sched: SCHED_DEADLINE push and pull logic
From
Date
On Fri, 2012-04-06 at 09:14 +0200, Juri Lelli wrote:
>
> static void set_cpus_allowed_dl(struct task_struct *p,
> @@ -622,10 +1346,145 @@ static void set_cpus_allowed_dl(struct task_struct *p,
>
> BUG_ON(!dl_task(p));
>
> + /*
> + * Update only if the task is actually running (i.e.,
> + * it is on the rq AND it is not throttled).
> + */
> + if (on_dl_rq(&p->dl) && (weight != p->dl.nr_cpus_allowed)) {
> + struct rq *rq = task_rq(p);
> +
> + if (!task_current(rq, p)) {
> + /*
> + * If the task was on the pushable list,
> + * make sure it stays there only if the new
> + * mask allows that.
> + */
> + if (p->dl.nr_cpus_allowed > 1)
> + dequeue_pushable_dl_task(rq, p);
> +
> + if (weight > 1)
> + enqueue_pushable_dl_task(rq, p);
> + }
> +
> + if ((p->dl.nr_cpus_allowed <= 1) && (weight > 1)) {
> + rq->dl.dl_nr_migratory++;
> + } else if ((p->dl.nr_cpus_allowed > 1) && (weight <= 1)) {
> + BUG_ON(!rq->dl.dl_nr_migratory);
> + rq->dl.dl_nr_migratory--;
> + }
> +
> + update_dl_migration(&rq->dl);

Note, I'm in the process of testing this patch:

https://lkml.org/lkml/2012/4/11/7

Just giving you a heads up, as this looks like you can benefit from this
change as well.

-- Steve


> + }
> +
> cpumask_copy(&p->cpus_allowed, new_mask);
> p->dl.nr_cpus_allowed = weight;
> }
> +




\
 
 \ /
  Last update: 2012-04-11 19:27    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean