lkml.org 
[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}()
From
Date
On Wed, 2005-06-08 at 03:22 +0000, M.Baris Demiray wrote:
> Hello Nick,
> a new patch related with recent thread is appended.
>

Hi,

> 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
this:


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).

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-08 02:53    [W:0.084 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site