public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Wang <wangyun@linux.vnet.ibm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: mingo@redhat.com, peterz@infradead.org,
	linaro-kernel@lists.linaro.org, patches@linaro.org,
	linux-kernel@vger.kernel.org, robin.randhawa@arm.com,
	Steve.Bannister@arm.com, Liviu.Dudau@arm.com,
	charles.garcia-tobin@arm.com, arvind.chauhan@arm.com
Subject: Re: [PATCH 1/2] sched: Optimize build_sched_domains() for saving first SD node for a cpu
Date: Wed, 05 Jun 2013 12:42:43 +0800	[thread overview]
Message-ID: <51AEC1C3.1040804@linux.vnet.ibm.com> (raw)
In-Reply-To: <d226c91fed3dfa2dca644d14c88b1d1ff9d2e722.1370344689.git.viresh.kumar@linaro.org>

Hi, Viresh

On 06/04/2013 07:20 PM, Viresh Kumar wrote:
[snip]
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 58453b8..638f6cb 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -6533,16 +6533,13 @@ static int build_sched_domains(const struct cpumask *cpu_map,
>  		sd = NULL;
>  		for (tl = sched_domain_topology; tl->init; tl++) {
>  			sd = build_sched_domain(tl, &d, cpu_map, attr, sd, i);
> +			if (!*per_cpu_ptr(d.sd, i))

What about:
			if (tl == sched_domain_topology)

It cost less than per_cpu_ptr(), isn't it?

Regards,
Michael Wang

> +				*per_cpu_ptr(d.sd, i) = sd;
>  			if (tl->flags & SDTL_OVERLAP || sched_feat(FORCE_SD_OVERLAP))
>  				sd->flags |= SD_OVERLAP;
>  			if (cpumask_equal(cpu_map, sched_domain_span(sd)))
>  				break;
>  		}
> -
> -		while (sd->child)
> -			sd = sd->child;
> -
> -		*per_cpu_ptr(d.sd, i) = sd;
>  	}
> 
>  	/* Build the groups for the domains */
> 


  parent reply	other threads:[~2013-06-05  4:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 11:20 [PATCH 1/2] sched: Optimize build_sched_domains() for saving first SD node for a cpu Viresh Kumar
2013-06-04 11:20 ` [PATCH 2/2] sched: Remove unused params of build_sched_domain() Viresh Kumar
2013-06-05  4:42 ` Michael Wang [this message]
2013-06-05  5:07   ` [PATCH 1/2] sched: Optimize build_sched_domains() for saving first SD node for a cpu Viresh Kumar
2013-06-05  5:26     ` Michael Wang
2013-06-05 11:04     ` Peter Zijlstra
2013-06-05 12:42       ` Viresh Kumar
2013-06-05 13:03         ` Peter Zijlstra

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=51AEC1C3.1040804@linux.vnet.ibm.com \
    --to=wangyun@linux.vnet.ibm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=Steve.Bannister@arm.com \
    --cc=arvind.chauhan@arm.com \
    --cc=charles.garcia-tobin@arm.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=patches@linaro.org \
    --cc=peterz@infradead.org \
    --cc=robin.randhawa@arm.com \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox