Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 12:56:23PM -0300, Lauro Venancio wrote: > > Another thing I've been thinking about; I think we can do away with the > > kzalloc() in build_group_from_child_sched_domain() and use the sdd->sg > > storage. > I considered this too. I decided to do not change this because I

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 12:56:23PM -0300, Lauro Venancio wrote: > > Another thing I've been thinking about; I think we can do away with the > > kzalloc() in build_group_from_child_sched_domain() and use the sdd->sg > > storage. > I considered this too. I decided to do not change this because I

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Lauro Venancio
On 04/25/2017 12:39 PM, Peter Zijlstra wrote: > On Tue, Apr 25, 2017 at 05:27:03PM +0200, Peter Zijlstra wrote: >> On Tue, Apr 25, 2017 at 05:22:36PM +0200, Peter Zijlstra wrote: >>> On Tue, Apr 25, 2017 at 05:12:00PM +0200, Peter Zijlstra wrote: But I'll first try and figure out why I'm not

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Lauro Venancio
On 04/25/2017 12:39 PM, Peter Zijlstra wrote: > On Tue, Apr 25, 2017 at 05:27:03PM +0200, Peter Zijlstra wrote: >> On Tue, Apr 25, 2017 at 05:22:36PM +0200, Peter Zijlstra wrote: >>> On Tue, Apr 25, 2017 at 05:12:00PM +0200, Peter Zijlstra wrote: But I'll first try and figure out why I'm not

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 05:39:37PM +0200, Peter Zijlstra wrote: > On Tue, Apr 25, 2017 at 05:27:03PM +0200, Peter Zijlstra wrote: > > Ah! the asymmetric setup, where @sibling is entirely uninitialized for > > the top domain. Like so then... --- a/kernel/sched/topology.c +++

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 05:39:37PM +0200, Peter Zijlstra wrote: > On Tue, Apr 25, 2017 at 05:27:03PM +0200, Peter Zijlstra wrote: > > Ah! the asymmetric setup, where @sibling is entirely uninitialized for > > the top domain. Like so then... --- a/kernel/sched/topology.c +++

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 05:27:03PM +0200, Peter Zijlstra wrote: > On Tue, Apr 25, 2017 at 05:22:36PM +0200, Peter Zijlstra wrote: > > On Tue, Apr 25, 2017 at 05:12:00PM +0200, Peter Zijlstra wrote: > > > But I'll first try and figure out why I'm not having empty masks. > > > > Ah, so this is

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 05:27:03PM +0200, Peter Zijlstra wrote: > On Tue, Apr 25, 2017 at 05:22:36PM +0200, Peter Zijlstra wrote: > > On Tue, Apr 25, 2017 at 05:12:00PM +0200, Peter Zijlstra wrote: > > > But I'll first try and figure out why I'm not having empty masks. > > > > Ah, so this is

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 05:22:36PM +0200, Peter Zijlstra wrote: > On Tue, Apr 25, 2017 at 05:12:00PM +0200, Peter Zijlstra wrote: > > But I'll first try and figure out why I'm not having empty masks. > > Ah, so this is before all the degenerate stuff, so there's a bunch of > redundant domains

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 05:22:36PM +0200, Peter Zijlstra wrote: > On Tue, Apr 25, 2017 at 05:12:00PM +0200, Peter Zijlstra wrote: > > But I'll first try and figure out why I'm not having empty masks. > > Ah, so this is before all the degenerate stuff, so there's a bunch of > redundant domains

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 05:12:00PM +0200, Peter Zijlstra wrote: > But I'll first try and figure out why I'm not having empty masks. Ah, so this is before all the degenerate stuff, so there's a bunch of redundant domains below that make it work -- and there always will be, unless FORCE_SD_OVERLAP.

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 05:12:00PM +0200, Peter Zijlstra wrote: > But I'll first try and figure out why I'm not having empty masks. Ah, so this is before all the degenerate stuff, so there's a bunch of redundant domains below that make it work -- and there always will be, unless FORCE_SD_OVERLAP.

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 11:33:51AM -0300, Lauro Venancio wrote: > On 04/25/2017 09:17 AM, Peter Zijlstra wrote: > > With the fact that sched_group_cpus(sd->groups) == > > sched_domain_span(sibling->child) (if child exists) established in the > > previous patches, could we not simplify this like

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Tue, Apr 25, 2017 at 11:33:51AM -0300, Lauro Venancio wrote: > On 04/25/2017 09:17 AM, Peter Zijlstra wrote: > > With the fact that sched_group_cpus(sd->groups) == > > sched_domain_span(sibling->child) (if child exists) established in the > > previous patches, could we not simplify this like

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Lauro Venancio
On 04/25/2017 09:17 AM, Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 12:11:59PM -0300, Lauro Venancio wrote: >> On 04/24/2017 10:03 AM, Peter Zijlstra wrote: >>> On Thu, Apr 20, 2017 at 04:51:43PM -0300, Lauro Ramos Venancio wrote: >>> diff --git a/kernel/sched/topology.c

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Lauro Venancio
On 04/25/2017 09:17 AM, Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 12:11:59PM -0300, Lauro Venancio wrote: >> On 04/24/2017 10:03 AM, Peter Zijlstra wrote: >>> On Thu, Apr 20, 2017 at 04:51:43PM -0300, Lauro Ramos Venancio wrote: >>> diff --git a/kernel/sched/topology.c

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 12:11:59PM -0300, Lauro Venancio wrote: > On 04/24/2017 10:03 AM, Peter Zijlstra wrote: > > 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 > >>

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-25 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 12:11:59PM -0300, Lauro Venancio wrote: > On 04/24/2017 10:03 AM, Peter Zijlstra wrote: > > 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 > >>

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 12:19:47PM -0300, Lauro Venancio wrote: > On 04/24/2017 11:27 AM, Peter Zijlstra wrote: > >>> 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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 12:19:47PM -0300, Lauro Venancio wrote: > On 04/24/2017 11:27 AM, Peter Zijlstra wrote: > >>> 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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 12:11:59PM -0300, Lauro Venancio wrote: > On 04/24/2017 10:03 AM, Peter Zijlstra wrote: > > 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 > >>

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 12:11:59PM -0300, Lauro Venancio wrote: > On 04/24/2017 10:03 AM, Peter Zijlstra wrote: > > 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 > >>

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Lauro Venancio
On 04/24/2017 11:27 AM, Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 04:19:44PM +0200, Peter Zijlstra wrote: >> On Mon, Apr 24, 2017 at 03:03:26PM +0200, Peter Zijlstra wrote: >> >>> Also, would it not make sense to re-order patch 2 to come after this, >>> such that we _do_ have the group_mask

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Lauro Venancio
On 04/24/2017 11:27 AM, Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 04:19:44PM +0200, Peter Zijlstra wrote: >> On Mon, Apr 24, 2017 at 03:03:26PM +0200, Peter Zijlstra wrote: >> >>> Also, would it not make sense to re-order patch 2 to come after this, >>> such that we _do_ have the group_mask

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Lauro Venancio
On 04/24/2017 10:03 AM, Peter Zijlstra wrote: > 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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Lauro Venancio
On 04/24/2017 10:03 AM, Peter Zijlstra wrote: > 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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 04:19:44PM +0200, Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 03:03:26PM +0200, Peter Zijlstra wrote: > > > 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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 04:19:44PM +0200, Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 03:03:26PM +0200, Peter Zijlstra wrote: > > > 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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 03:03:26PM +0200, Peter Zijlstra wrote: > 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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 03:03:26PM +0200, Peter Zijlstra wrote: > 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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
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

Re: [PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-24 Thread Peter Zijlstra
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

[PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-20 Thread Lauro Ramos Venancio
An overlap sched group may not be installed in all cpus that compose the group. Currently, the group balance cpu may be a cpu where the group is not installed, causing two problems: 1) Two groups may have the same group balance cpu and, as consequence, share the sched_group_capacity. 2)

[PATCH 4/4] sched/topology: the group balance cpu must be a cpu where the group is installed

2017-04-20 Thread Lauro Ramos Venancio
An overlap sched group may not be installed in all cpus that compose the group. Currently, the group balance cpu may be a cpu where the group is not installed, causing two problems: 1) Two groups may have the same group balance cpu and, as consequence, share the sched_group_capacity. 2)