All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: "M.Baris Demiray" <baris@labristeknoloji.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.12-rc5-mm2] [sched] add allowed CPUs check into find_idlest_group()
Date: Mon, 06 Jun 2005 20:36:53 +1000	[thread overview]
Message-ID: <42A42745.9080103@yahoo.com.au> (raw)
In-Reply-To: <42A42FDE.2040600@labristeknoloji.com>

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 

  reply	other threads:[~2005-06-06 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-05 17:36 [PATCH 2.6.12-rc5-mm2] [sched] add allowed CPUs check into find_idlest_group() M.Baris Demiray
2005-06-06  1:44 ` Nick Piggin
2005-06-06 11:13   ` M.Baris Demiray
2005-06-06 10:36     ` Nick Piggin [this message]
2005-06-06 13:59       ` M.Baris Demiray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42A42745.9080103@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=baris@labristeknoloji.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.