From: Paul Jackson <pj@sgi.com>
To: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: 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: Tue, 15 Aug 2006 21:24:55 -0700 [thread overview]
Message-ID: <20060815212455.c9fe1e34.pj@sgi.com> (raw)
In-Reply-To: <20060815175525.A2333@unix-os.sc.intel.com>
Thanks for the cleanup patch resend, Suresh.
> Resending the new patch. Before patch had some issues for Andy and hence
> dropped.
>
> Andrew, Please add this to -mm. This patch is against 2.6.18-rc4.
> There might be a small conflict while applying to -mm. Let me know if you
> want a patch on top of -mm.
>
> thanks,
> suresh
>
> --
I found the above patch commentary frustrating to read, as it told me
very little, and teased me with reference to details that are left
unsaid.
Can we work on this patch's opening text a bit more?
Take a look at Andrew's "The perfect patch"
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
The above quoted material doesn't follow the recommendations
in the (4) Changelog section of Andrew's recommendations, especially
(4a), (4b), (4c) and (4d).
The above quoted material is stuff that will mean little to someone
looking at this changelog in the source history a year from now. Heck,
it means little to me, now, and I supposedly have been trying to track
your sched domain cleanup work more closely than most people.
Just now I ran a grep over my lkml email archives for the last few
months, and apparently the "issue for Andy" refers to a thread that
includes a message dated "Mon, 03 Jul 2006" from Andy Whitcroft under
the generic Subject of "Re: 2.6.17-mm5", noticing a problem with a
panic on NUMA-Q due to a zero cpu_power. Anyone besides Andy and
Suresh who knew that without poking around old lkml messages has way
too good a memory ;).
> Cleanup the sched group cpu_power setup code, by introducing
> child field and new domain flag in sched_domain.
I guess you meant the above two lines to be the actual Changelog
text, to be read by all who examine this change to Linux in the
source control history hereafteer.
But as explained in Andrew's recommendations, the recommended
changelog text should come first (after a possible "From:" line)
in the patch email, followed by "---" a line with just three
dashes, followed by the transient text that will mean little
in the future.
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 ...
> + * cpu_power indicates the computing power of each sched group. This is
> + * used for distributing the load between different sched groups
> + * in a sched domain.
Thanks for explaining what cpu_power means.
> ... 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? Or perhaps my newbie ignorance of what 'group'
means is showing through, and my question makes no sense - sorry
if so.
+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?
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.
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?
+ /*
+ * 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?"
> + 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)
)) {
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
next prev parent reply other threads:[~2006-08-16 4:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-16 0:55 [patch] sched: group CPU power setup cleanup Siddha, Suresh B
2006-08-16 4:24 ` Paul Jackson [this message]
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
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=20060815212455.c9fe1e34.pj@sgi.com \
--to=pj@sgi.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=suresh.b.siddha@intel.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