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? > In addition to that, do a patch for find_idlest_cpu that > skips cpus that aren't allowed. You needn't do the cpumask > check each time round the loop, again just take the > intersection of the group->cpumask and p->cpus_allowed, and > loop over that. Will do it. > Wanna do a patch for that? Sure. But I'll wait EOT and do read something more to fill the gaps. > [...] > > 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; } Thanks for comments. > -- "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