public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, npiggin@suse.de,
	mingo@elte.hu
Subject: Re: [PATCH] Fix longstanding load balancing bug in the scheduler.
Date: Fri, 8 Sep 2006 10:35:29 -0700	[thread overview]
Message-ID: <20060908103529.A9121@unix-os.sc.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0609061634240.13322@schroedinger.engr.sgi.com>; from clameter@sgi.com on Wed, Sep 06, 2006 at 04:38:33PM -0700

On Wed, Sep 06, 2006 at 04:38:33PM -0700, Christoph Lameter wrote:
> +int cpu_of(struct rq *rq)
> +{
> +#ifdef CONFIG_SMP
> +	return rq->cpu;
> +#else
> +	return 0;
> +#endif
> +}

Is there a reason why this is not made inline?

>  static struct sched_group *
>  find_busiest_group(struct sched_domain *sd, int this_cpu,
> -		   unsigned long *imbalance, enum idle_type idle, int
> *sd_idle)
> +		   unsigned long *imbalance, enum idle_type idle, int
> *sd_idle,
> +		   cpumask_t *cpus)
>  {
>  	struct sched_group *busiest = NULL, *this = NULL, *group =
> sd->groups;
>  	unsigned long max_load, avg_load, total_load, this_load,
> total_pwr;
> @@ -2243,7 +2254,12 @@
>  		sum_weighted_load = sum_nr_running = avg_load = 0;
>  
>  		for_each_cpu_mask(i, group->cpumask) {
> -			struct rq *rq = cpu_rq(i);
> +			struct rq *rq;
> +
> +			if (!cpu_isset(i, *cpus))
> +				continue;

In normal conditions can we make this "cpus" argument NULL and only set/use it
when we run into pinned condition? That will atleast avoid unnecessary memory
test bit operations in the normal case.

thanks,
suresh

  parent reply	other threads:[~2006-09-08 17:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-06 23:38 [PATCH] Fix longstanding load balancing bug in the scheduler Christoph Lameter
2006-09-07 10:58 ` Nick Piggin
2006-09-07 15:29   ` Christoph Lameter
2006-09-07 17:24   ` Christoph Lameter
2006-09-07 21:47     ` Nick Piggin
2006-09-07 22:20       ` Christoph Lameter
2006-09-07 22:32         ` Nick Piggin
2006-09-08  2:52           ` Christoph Lameter
2006-09-08 17:35 ` Siddha, Suresh B [this message]
2006-09-08 18:40   ` Christoph Lameter
2006-09-08 20:00     ` Siddha, Suresh B
2006-09-08 20:19       ` Christoph Lameter
2006-09-09  0:03         ` Siddha, Suresh B
2006-09-09  5:25           ` Christoph Lameter
2006-09-09 19:56             ` Christoph Lameter
2006-09-11  8:37               ` Nick Piggin
2006-09-12 18:37                 ` [PATCH] Fix longstanding load balancing bug in the scheduler V2 Christoph Lameter
2006-09-15  0:26                   ` Andrew Morton
2006-09-15  9:44                     ` Ingo Molnar

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=20060908103529.A9121@unix-os.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox