lkml.org 
[lkml]   [2005]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.12-rc5-mm2] [sched] add allowed CPUs check into find_idlest_group()
M.Baris Demiray wrote:
>
> Hello Nick,
>
> Nick Piggin wrote:
>
>> M.Baris Demiray wrote:
>>
>> [...]
>> Close.
>>
>> Probably it would be better to take the intersection of
>> (group->cpumask, p->cpus_allowed), and skip the group if
>> the intersection is empty.
>
>
> 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.

> > [...]
>
>>
>> I don't think it does anything ;)
>
>
> LOL. Hope next one'll do.
>
> 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.

Thanks,
Nick

--
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-06 12:41    [W:0.031 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site