lkml.org 
[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/16] sched: SCHED_DEADLINE push and pull logic
On 04/11/2012 07:25 PM, Steven Rostedt wrote:
> 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.
>

Sure! I noticed it just today and started wondering how it would apply in
my case.

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

Thanks,

- Juri


\
 
 \ /
  Last update: 2012-04-11 19:51    [W:0.919 / U:1.028 seconds]
©2003-2014 Jasper Spaans. Advertise on this site