mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: Paul Jackson <pj@sgi.com>, akpm@osdl.org
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	akpm@osdl.org, linux-kernel@vger.kernel.org,
	nickpiggin@yahoo.com.au, mingo@redhat.com, apw@shadowen.org
Subject: Re: [patch] sched: group CPU power setup cleanup
Date: Wed, 16 Aug 2006 10:45:51 -0700	[thread overview]
Message-ID: <20060816104551.A7305@unix-os.sc.intel.com> (raw)
In-Reply-To: <20060815212455.c9fe1e34.pj@sgi.com>; from pj@sgi.com on Tue, Aug 15, 2006 at 09:24:55PM -0700

On Tue, Aug 15, 2006 at 09:24:55PM -0700, Paul Jackson wrote:
> That is, you had:
> 
> 
>   transient text
> 
>   --
> 
>   permanent changelog text (just the above 2 lines)
> 
>   Signed-off-by: ...
> 
>   diff ...
> 
> 
> Andrew's recommendations would instead have:
> 
> 
>   permanent changelog text (more than 2 lines, I hope,
>   in this case)
> 
>   Signed-off-by: ...
> 
>   ---
> 
>   transient text
> 
>   diff ...

Andrew, is it possible for changing your tpp format such that transient
text comes on the top followed by the change log and signed-off-by...
Transient text will have more info about the patch in the context of
an ongoing lkml thread conversation. Hence it makes sense to be on top rather
than somewhere in between the changelog and the patch.

I will def add more appropriate changelog text..

> > ... Typically cpu_power for all the groups in a
> > + * sched domain will be same unless there are asymmetries in the topology.
> 
> Does the above mean that all groups in a domain have the same
> number of CPUs?

typically yes. cpuhotplug or exclusive cpusets can change it..

> 
> 
> +static void init_sched_groups_power(int cpu, struct sched_domain *sd)
> +{
> +	...
> +
> +	if (cpu != first_cpu(sd->groups->cpumask))
> +		return;
> 
> I am a tad surprised that the above always works.  Is it ever possible
> that init_sched_groups_power() is never called for the first cpu in a
> group, and that hence the cpu_power of that group is not uninitialized?

No. This is not possible. 

> If there is some explanation as to how this is not possible, and it is
> guaranteed that init_sched_groups_power() is always called for the
> first cpu in a group, then that might be worthy of a comment.

init_sched_groups_power is called for each cpu in the cpu_map and hence for
all the cpus in a group.

> 
> Is it possible to get the partition1 or partition2 in the calls:
> 
>     int partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2)
>     {
> 	    ...
> 	    if (!cpus_empty(*partition1))
> 		    err = build_sched_domains(partition1);
> 	    if (!err && !cpus_empty(*partition2))
> 		    err = build_sched_domains(partition2);
> 
> so some group had some CPUs, but not the first CPU of groups->cpumask
> in one of these partitions?

Question doesn't make sense... each domain has it own specific groups..

> +	/*
> +	 * For perf policy, if the groups in child domain share resources
> +	 * (for example cores sharing some portions of the cache hierarchy
> +	 * or SMT), then set this domain groups cpu_power such that each group
> +	 * can handle only one task, when there are other idle groups in the
> +	 * same sched domain.
> +	 */
> 
> I am clearly still missing proper understanding here.  How is it that
> the cpu_power of a group can be set so that it "can handle only one task?"

Please see the find_busiest_group() code and how its uses cpu_power.
For example if a group has two tasks and if its cpu_power is
1 * SCHED_LOAD_SCALE, then any other idle group in the domain will pickup
the extra task. I have explained the significance of the 'multiple' in the
comments.

> 
> 
> > +	if (!child || (!(sd->flags & SD_POWERSAVINGS_BALANCE) &&
> > +		       (child->flags & SD_SHARE_CPUPOWER ||
> > +			child->flags & SD_SHARE_PKG_RESOURCES))) {
> 
> Would this be equivalent to the following, which saves a few
> machine instructions and a conditional jump as well:
> 
> 	if (!child || (!(sd->flags & SD_POWERSAVINGS_BALANCE) &&
> 		       (child->flags &
> 				(SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES)
> 			)) {

compiler will be doing it. Anyhow I will include this change, as it is cleaner.

thanks,
suresh

  parent reply	other threads:[~2006-08-16 17:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-16  0:55 Siddha, Suresh B
2006-08-16  4:24 ` Paul Jackson
2006-08-16  4:47   ` Andrew Morton
2006-08-16  5:53     ` Paul Jackson
2006-08-16 18:03     ` Siddha, Suresh B
2006-08-17 17:20       ` Paul Jackson
2006-08-17 18:03         ` Siddha, Suresh B
2006-08-17 19:18           ` Paul Jackson
2006-08-17 23:29             ` Ian Stirling
2006-08-17 23:35               ` Paul Jackson
2006-08-17 23:56         ` Peter Williams
2006-08-18  4:15         ` Paul Mackerras
2006-08-16 17:45   ` Siddha, Suresh B [this message]
2006-08-18 21:23     ` [patch] sched: generic sched_group cpu power setup Siddha, Suresh B
2006-08-18 22:29       ` Paul Jackson
2006-08-18 22:42         ` Siddha, Suresh B
2006-08-19  0:09           ` Paul Jackson
2006-08-21 22:19             ` Siddha, Suresh B
  -- strict thread matches above, loose matches on Subject: below --
2006-06-30  0:31 [Patch] sched: group CPU power setup cleanup Siddha, Suresh B

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=20060816104551.A7305@unix-os.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=akpm@osdl.org \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pj@sgi.com \
    /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

Powered by JetHome