All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@intel.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: npiggin@kernel.dk, mingo@redhat.com, peterz@infradead.org,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Mike Galbraith <efault@gmx.de>
Subject: Re: [PATCH 01/10] sched: select_task_rq_fair clean up
Date: Fri, 07 Dec 2012 09:22:54 +0800	[thread overview]
Message-ID: <50C144EE.3040308@intel.com> (raw)
In-Reply-To: <CAFTL4hyfxXcrgn2WZimoeH0FmNYJ1ZubnD2KM1S6GWVAbymEyA@mail.gmail.com>

On 12/07/2012 09:02 AM, Frederic Weisbecker wrote:
> 2012/12/7 Alex Shi <alex.shi@intel.com>:
>> On 12/07/2012 01:50 AM, Frederic Weisbecker wrote:
>>> 2012/12/3 Alex Shi <alex.shi@intel.com>:
>>>> It is impossible to miss a task allowed cpu in a eligible group.
>>>>
>>>> And since find_idlest_group only return a different group which
>>>> excludes old cpu, it's also imporissible to find a new cpu same as old
>>>> cpu.
>>>
>>> Is it possible for weighted_cpuload() to return ULONG_MAX? If so,
>>> find_idlest_cpu() can return -1.
>>>
>>
>> No, non of sched entity can has a ULONG_MAX weight.
> 
> Ok. find_idlest_cpu() can still return -1 but select_task_rq_fair() is
> the only caller. Presumably safe but code evolves. May be add some
> comment to explain why what you're doing is safe. May be a
> WARN_ON_ONCE() could be good to add?
> 

why you think it is possible to be -1?
And there is a WARN_ON_ONCE for cpu = -1 in find_idlest_group when
checking local_group.

Thanks!


  reply	other threads:[~2012-12-07  1:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 13:54 [PATCH 0/4] sched: fork/exec/wake clean up Alex Shi
2012-12-03 13:54 ` [PATCH 01/10] sched: select_task_rq_fair " Alex Shi
2012-12-06 17:50   ` Frederic Weisbecker
2012-12-07  0:31     ` Alex Shi
2012-12-07  1:02       ` Frederic Weisbecker
2012-12-07  1:22         ` Alex Shi [this message]
2012-12-03 13:54 ` [PATCH 02/10] sched: fix find_idlest_group mess logical Alex Shi
2012-12-07  0:56   ` Frederic Weisbecker
2012-12-07  1:32     ` Alex Shi
2012-12-07  8:33       ` Frederic Weisbecker
2012-12-08 12:12         ` Alex Shi
2012-12-03 13:54 ` [PATCH 03/10] sched: don't need go to smaller sched domain Alex Shi
2012-12-03 13:54 ` [PATCH 04/10] sched: remove domain iterations in fork/exec/wake Alex Shi
2012-12-05  7:09 ` [PATCH 0/4] sched: fork/exec/wake clean up Alex Shi
2012-12-07  0:33   ` Alex Shi

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=50C144EE.3040308@intel.com \
    --to=alex.shi@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=npiggin@kernel.dk \
    --cc=peterz@infradead.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.