Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-25 Thread Rohit Jain
On 04/24/2018 07:51 PM, Viresh Kumar wrote: On 24-04-18, 15:34, Rohit Jain wrote: Including the "unlikely" suggestion and the original patch, as expected with a quick hackbench test on a 44 core 2 socket x86 machine causes no change in performance. Want me to include your Tested-by in next ve

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-25 Thread Quentin Perret
On Wednesday 25 Apr 2018 at 15:43:13 (+0530), Viresh Kumar wrote: > On 25-04-18, 10:39, Quentin Perret wrote: > > On Wednesday 25 Apr 2018 at 14:33:27 (+0530), Viresh Kumar wrote: > > > On 25-04-18, 09:13, Quentin Perret wrote: > > > > While you're at it, you could probably remove the one in wake_c

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-25 Thread Viresh Kumar
On 25-04-18, 10:39, Quentin Perret wrote: > On Wednesday 25 Apr 2018 at 14:33:27 (+0530), Viresh Kumar wrote: > > On 25-04-18, 09:13, Quentin Perret wrote: > > > While you're at it, you could probably remove the one in wake_cap() ? I > > > think having just one in select_task_rq_fair() should be en

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-25 Thread Quentin Perret
On Wednesday 25 Apr 2018 at 14:33:27 (+0530), Viresh Kumar wrote: > On 25-04-18, 09:13, Quentin Perret wrote: > > While you're at it, you could probably remove the one in wake_cap() ? I > > think having just one in select_task_rq_fair() should be enough. > > Just make it clear, you are asking me t

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-25 Thread Viresh Kumar
On 25-04-18, 09:13, Quentin Perret wrote: > While you're at it, you could probably remove the one in wake_cap() ? I > think having just one in select_task_rq_fair() should be enough. Just make it clear, you are asking me to remove sync_entity_load_avg() in wake_cap() ? But aren't we required to do

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-25 Thread Quentin Perret
On Wednesday 25 Apr 2018 at 10:45:09 (+0530), Viresh Kumar wrote: > On 24-04-18, 14:35, Peter Zijlstra wrote: > > In any case, if there not going to be conflicts here, this all looks > > good. > > Thanks Peter. > > I also had another patch and wasn't sure if that would be the right > thing to do.

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-25 Thread Quentin Perret
On Tuesday 24 Apr 2018 at 14:35:23 (+0200), Peter Zijlstra wrote: > On Tue, Apr 24, 2018 at 12:19:07PM +0100, Valentin Schneider wrote: > > On 24/04/18 11:43, Peter Zijlstra wrote: > > > On Tue, Apr 24, 2018 at 11:02:26AM +0100, Valentin Schneider wrote: > > >> I'd argue making things easier to rea

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Viresh Kumar
On 24-04-18, 14:35, Peter Zijlstra wrote: > In any case, if there not going to be conflicts here, this all looks > good. Thanks Peter. I also had another patch and wasn't sure if that would be the right thing to do. The main purpose of this is to avoid calling sync_entity_load_avg() unnecessarily

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Viresh Kumar
On 24-04-18, 15:34, Rohit Jain wrote: > Including the "unlikely" suggestion and the original patch, as expected > with a quick hackbench test on a 44 core 2 socket x86 machine causes no > change in performance. Want me to include your Tested-by in next version ? -- viresh

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Rohit Jain
On 04/24/2018 08:47 AM, Joel Fernandes wrote: On Tue, Apr 24, 2018 at 8:46 AM, Joel Fernandes wrote: On Tue, Apr 24, 2018 at 5:35 AM, Peter Zijlstra wrote: On Tue, Apr 24, 2018 at 12:19:07PM +0100, Valentin Schneider wrote: On 24/04/18 11:43, Peter Zijlstra wrote: On Tue, Apr 24, 2018 at

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 8:46 AM, Joel Fernandes wrote: > On Tue, Apr 24, 2018 at 5:35 AM, Peter Zijlstra wrote: >> On Tue, Apr 24, 2018 at 12:19:07PM +0100, Valentin Schneider wrote: >>> On 24/04/18 11:43, Peter Zijlstra wrote: >>> > On Tue, Apr 24, 2018 at 11:02:26AM +0100, Valentin Schneider wr

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 5:35 AM, Peter Zijlstra wrote: > On Tue, Apr 24, 2018 at 12:19:07PM +0100, Valentin Schneider wrote: >> On 24/04/18 11:43, Peter Zijlstra wrote: >> > On Tue, Apr 24, 2018 at 11:02:26AM +0100, Valentin Schneider wrote: >> >> I'd argue making things easier to read is a non-ne

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Peter Zijlstra
On Tue, Apr 24, 2018 at 12:19:07PM +0100, Valentin Schneider wrote: > On 24/04/18 11:43, Peter Zijlstra wrote: > > On Tue, Apr 24, 2018 at 11:02:26AM +0100, Valentin Schneider wrote: > >> I'd argue making things easier to read is a non-negligible part as well. > > > > Right, so I don't object to e

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Valentin Schneider
On 24/04/18 11:43, Peter Zijlstra wrote: > On Tue, Apr 24, 2018 at 11:02:26AM +0100, Valentin Schneider wrote: >> I'd argue making things easier to read is a non-negligible part as well. > > Right, so I don't object to either of these (I think); but it would be > good to see this in combination wi

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Peter Zijlstra
On Tue, Apr 24, 2018 at 11:02:26AM +0100, Valentin Schneider wrote: > I'd argue making things easier to read is a non-negligible part as well. Right, so I don't object to either of these (I think); but it would be good to see this in combination with that proposed EAS change. I think you (valenti

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Viresh Kumar
On 24-04-18, 11:02, Valentin Schneider wrote: > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index cacee15..ad09b67 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -6613,7 +6613,7 @@ static int wake_cap(struct task_struct *p, int cpu, int > prev_cpu) > static int >

Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it

2018-04-24 Thread Valentin Schneider
Hi, On 23/04/18 11:38, Viresh Kumar wrote: > Rearrange select_task_rq_fair() a bit to avoid executing some > conditional statements in few specific code-paths. That gets rid of the > goto as well. > I'd argue making things easier to read is a non-negligible part as well. > This shouldn't result