Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1623777
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology |
| Date | 2017-04-14 19:00 +0200 |
| Message-ID | <twcJI-3tb-9@gated-at.bofh.it> (permalink) |
| References | <tvNrX-3KR-5@gated-at.bofh.it> <tvNrX-3KR-3@gated-at.bofh.it> <tw7K1-x1-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Apr 14, 2017 at 01:38:13PM +0200, Peter Zijlstra wrote:
> On Thu, Apr 13, 2017 at 10:56:08AM -0300, Lauro Ramos Venancio wrote:
> > This patch constructs the sched groups from each CPU perspective. So, on
> > a 4 nodes machine with ring topology, while nodes 0 and 2 keep the same
> > groups as before [(3, 0, 1)(1, 2, 3)], nodes 1 and 3 have new groups
> > [(0, 1, 2)(2, 3, 0)]. This allows moving tasks between any node 2-hops
> > apart.
>
> Ah,.. so after drawing pictures I see what went wrong; duh :-(
>
> An equivalent patch would be (if for_each_cpu_wrap() were exposed):
>
> @@ -521,11 +588,11 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
> struct cpumask *covered = sched_domains_tmpmask;
> struct sd_data *sdd = sd->private;
> struct sched_domain *sibling;
> - int i;
> + int i, wrap;
>
> cpumask_clear(covered);
>
> - for_each_cpu(i, span) {
> + for_each_cpu_wrap(i, span, cpu, wrap) {
> struct cpumask *sg_span;
>
> if (cpumask_test_cpu(i, covered))
>
>
> We need to start iterating at @cpu, not start at 0 every time.
>
>
OK, please have a look here:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=sched/core
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Lauro Ramos Venancio <lvenanci@redhat.com> - 2017-04-13 16:00 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Rik van Riel <riel@redhat.com> - 2017-04-13 17:20 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Peter Zijlstra <peterz@infradead.org> - 2017-04-13 17:50 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Lauro Venancio <lvenanci@redhat.com> - 2017-04-13 22:30 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Lauro Venancio <lvenanci@redhat.com> - 2017-04-13 23:10 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Rik van Riel <riel@redhat.com> - 2017-04-14 01:40 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Peter Zijlstra <peterz@infradead.org> - 2017-04-14 12:50 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Peter Zijlstra <peterz@infradead.org> - 2017-04-14 13:40 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Peter Zijlstra <peterz@infradead.org> - 2017-04-14 14:30 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Peter Zijlstra <peterz@infradead.org> - 2017-04-14 19:00 +0200
Re: [RFC 2/3] sched/topology: fix sched groups on NUMA machines with mesh topology Lauro Venancio <lvenanci@redhat.com> - 2017-04-17 16:50 +0200
csiph-web