Re: [PATCH 2.6.12-rc5-mm2] [sched] add allowed CPUs check into find_idlest_group()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Nick Piggin wrote:
M.Baris Demiray wrote:
> [...]

But, isn't it required for us to be allowed to run on _every_
CPU in that group. If we take intersection and continue if
that's not empty, then there could be CPUs in group that are
not allowed. Since any CPU then can be the idlest in that
group we can be assigned to a CPU that is not allowed.
Missing something?


That should be OK. We basically aren't too interested in
exactly which CPU it should go to, but just that it should
go to that group.

If the group is determined to be the idlest, and there is
a CPU that can run the task, then that's all we need.

OK. And also I missed the point that you requested a second check
in find_idlest_cpu() which'll prevent an assignment to an unallowed
CPU. That will solve the problem.

> [...]

Meanwhile, what is the problem with that patch? Not traversing
the CPUs correctly or continue;ing is wrong?

    for_each_cpu_mask(i, group->cpumask) {
        if (!cpu_isset(i, p->cpus_allowed))
            continue;
    }


In Linux, the for_* macros actually *are* for loops. So that is
that loop that your continue continues, and seeing as it is at
the end of that for loop, it does nothing.

Argh. I'll look at these.

Thanks Nick.

Thanks,
Nick


--
"You have to understand, most of these people are not ready to be
unplugged. And many of them are no inert, so hopelessly dependent
on the system, that they will fight to protect it."
                                                        Morpheus
begin:vcard
fn:M.Baris Demiray
n:Demiray;M.Baris
org:Labris Teknoloji
adr:;;Teknokent Silikon Bina No:24 ODTU;Ankara;;06531;Turkey
email;internet:[email protected]
title:Yazilim Gelistirme Uzmani
tel;work:+903122101490
tel;fax:+903122101492
x-mozilla-html:FALSE
url:http://www.labristeknoloji.com
version:2.1
end:vcard


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux