[lkml]   [2005]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2.6.12-rc6-mm1] add allowed CPUs check into find_idlest_{group|cpu}()
On Wed, 2005-06-08 at 03:22 +0000, M.Baris Demiray wrote:
> Hello Nick,
> a new patch related with recent thread is appended.


> I check for CPUs only, ie. not for intersection, in find_idlest_cpu()
> since there should be one-to-one comparison when finding CPU. But I
> take intersection of group's CPUs and current task's allowed CPUs in
> find_allowed_group(). Comments?

Getting better. Thanks.

By taking the intersection in find_idlest_cpu, I don't mean checking
whether or not they intersect as in find_idlest_group. I mean doing

cpumask_t tmp;

/* Find the intersection */
cpus_and(tmp, group->cpumask, p->cpus_allowed);

for_each_cpu_mask(i, tmp) {

Right? That is effectively the same as what you've got in your patch,
but it means we don't need to do the cpumask comparison every time
around the loop (aside from being an extra branch, the actual operation
itself gets a little costly with huge cpu masks).


SUSE Labs, Novell Inc.

Send instant messages to your online friends

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-06-08 02:53    [W:0.074 / U:1.884 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site