Thread (15 messages) 15 messages, 5 authors, 2011-07-28

Re: On migrate_disable() and latencies

From: Yong Zhang <hidden>
Date: 2011-07-28 07:10:30
Also in: lkml

On Thu, Jul 28, 2011 at 09:01:23AM +0200, Thomas Gleixner wrote:
We do. Just RT is the only sched class which has a set_cpus_allowed()
callback implemented and want's an update to its rt.nr_cpus_allowed
field.

       if (!p->migrate_disable) {
                if (p->sched_class && p->sched_class->set_cpus_allowed)
                        p->sched_class->set_cpus_allowed(p, new_mask);
                p->rt.nr_cpus_allowed = cpumask_weight(new_mask);
        }

The general part is here:

       cpumask_copy(&p->cpus_allowed, new_mask);

And tsk_cpus_allowed() does:
{
        if (p->migrate_disable)
                return cpumask_of(task_cpu(p));

        return &p->cpus_allowed;
}
Hmmm, sched-use-task-allowed-accessor.patch is the preparation :)

Clear now, thanks Thomas.

-Yong

-- 
Only stand for myself
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help