Re: [PATCH 2.6.12-rc6-mm1] add allowed CPUs check into find_idlest_{group|cpu}()

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

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[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