Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1629529
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed |
| Date | 2017-04-24 15:10 +0200 |
| Message-ID | <tzLUD-7pd-35@gated-at.bofh.it> (permalink) |
| References | <tyqpb-4ED-9@gated-at.bofh.it> <tyqpb-4ED-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Apr 20, 2017 at 04:51:43PM -0300, Lauro Ramos Venancio wrote:
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index e77c93a..694e799 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -505,7 +507,11 @@ static void build_group_mask(struct sched_domain *sd, struct sched_group *sg)
>
> for_each_cpu(i, sg_span) {
> sibling = *per_cpu_ptr(sdd->sd, i);
> - if (!cpumask_test_cpu(i, sched_domain_span(sibling)))
> +
> + if (!sibling->groups)
> + continue;
How can this happen?
> +
> + if (!cpumask_equal(sg_span, sched_group_cpus(sibling->groups)))
> continue;
>
> cpumask_set_cpu(i, sched_group_mask(sg));
> @@ -1482,6 +1502,14 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
> }
> }
>
> + /* Init overlap groups */
> + for_each_cpu(i, cpu_map) {
> + for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
> + if (sd->flags & SD_OVERLAP)
> + init_overlap_sched_groups(sd);
> + }
> + }
Why does this have to be a whole new loop? This is because in
build_group_mask() we could encounter @sibling that were not constructed
yet?
So this is the primary fix?
> +
> /* Calculate CPU capacity for physical packages and nodes */
> for (i = nr_cpumask_bits-1; i >= 0; i--) {
> if (!cpumask_test_cpu(i, cpu_map))
Also, would it not make sense to re-order patch 2 to come after this,
such that we _do_ have the group_mask available and don't have to jump
through hoops in order to link up the sgc? Afaict we don't actually use
the sgc until the above (reverse) loop computing the CPU capacities.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] sched/topology: fix overlap group capacity and balance cpu Lauro Ramos Venancio <lvenanci@redhat.com> - 2017-04-20 22:00 +0200
[PATCH 1/4] sched/topology: optimize build_group_mask() Lauro Ramos Venancio <lvenanci@redhat.com> - 2017-04-20 22:00 +0200
[PATCH 3/4] sched/topology: move comment about asymmetric node setups Lauro Ramos Venancio <lvenanci@redhat.com> - 2017-04-20 22:00 +0200
Re: [PATCH 3/4] sched/topology: move comment about asymmetric node setups Peter Zijlstra <peterz@infradead.org> - 2017-04-21 19:50 +0200
[PATCH 2/4] sched/topology: all instances of a sched group must use the same sched_group_capacity Lauro Ramos Venancio <lvenanci@redhat.com> - 2017-04-20 22:00 +0200
[PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Lauro Ramos Venancio <lvenanci@redhat.com> - 2017-04-20 22:00 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-24 15:10 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-24 16:30 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-24 16:30 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Lauro Venancio <lvenanci@redhat.com> - 2017-04-24 17:30 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 00:30 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Lauro Venancio <lvenanci@redhat.com> - 2017-04-24 17:20 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 00:20 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 14:20 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Lauro Venancio <lvenanci@redhat.com> - 2017-04-25 16:40 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 17:30 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 17:50 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 18:00 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Lauro Venancio <lvenanci@redhat.com> - 2017-04-25 18:00 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 18:30 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 17:30 +0200
Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed Peter Zijlstra <peterz@infradead.org> - 2017-04-25 17:30 +0200
Re: [PATCH 0/4] sched/topology: fix overlap group capacity and balance cpu Peter Zijlstra <peterz@infradead.org> - 2017-04-26 18:40 +0200
Re: [PATCH 0/4] sched/topology: fix overlap group capacity and balance cpu Lauro Venancio <lvenanci@redhat.com> - 2017-04-26 20:00 +0200
Re: [PATCH 0/4] sched/topology: fix overlap group capacity and balance cpu Peter Zijlstra <peterz@infradead.org> - 2017-04-27 00:50 +0200
Re: [PATCH 0/4] sched/topology: fix overlap group capacity and balance cpu Peter Zijlstra <peterz@infradead.org> - 2017-04-28 12:40 +0200
csiph-web