Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Peter Zijlstra
On Fri, Jun 19, 2020 at 02:25:20PM +0100, Valentin Schneider wrote: > > On 19/06/20 13:51, Qais Yousef wrote: > > On 06/19/20 11:36, Valentin Schneider wrote: > >> > >> On 18/06/20 20:55, Qais Yousef wrote: > >> > There is a report that when uclamp is enabled, a netperf UDP test > >> > regresses

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Valentin Schneider
On 19/06/20 18:25, Qais Yousef wrote: > On 06/19/20 16:17, Valentin Schneider wrote: > > [...] > >> > But here this is >> > just extra churn. >> > >> > If an imbalance has happend this means either: >> > >> > 1. enqueue/dequeue_task() is imablanced itself >> > 2.

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Qais Yousef
On 06/19/20 19:45, Peter Zijlstra wrote: > On Thu, Jun 18, 2020 at 08:55:25PM +0100, Qais Yousef wrote: > > > +/* > > + * This static key is used to reduce the uclamp overhead in the fast path. > > It > > + * only disables the call to uclamp_rq_{inc, dec}() in > > enqueue/dequeue_task(). > > +

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Peter Zijlstra
On Thu, Jun 18, 2020 at 08:55:25PM +0100, Qais Yousef wrote: > +/* > + * This static key is used to reduce the uclamp overhead in the fast path. It > + * only disables the call to uclamp_rq_{inc, dec}() in > enqueue/dequeue_task(). > + * > + * This allows users to continue to enable uclamp in

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Qais Yousef
On 06/19/20 16:17, Valentin Schneider wrote: [...] > > But here this is > > just extra churn. > > > > If an imbalance has happend this means either: > > > > 1. enqueue/dequeue_task() is imablanced itself > > 2. uclamp_update_active() calls dec without inc. > > > > If 1 happened we

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Qais Yousef
On 06/19/20 12:57, Mel Gorman wrote: > On Fri, Jun 19, 2020 at 11:36:46AM +0100, Valentin Schneider wrote: > > >nouclamp uclamp > > > uclamp-static-key > > > Hmean send-64 162.43 ( 0.00%) 157.84 * -2.82%* > > >

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Valentin Schneider
On 19/06/20 15:13, Qais Yousef wrote: > On 06/19/20 14:25, Valentin Schneider wrote: >> >> On 19/06/20 13:51, Qais Yousef wrote: >> > On 06/19/20 11:36, Valentin Schneider wrote: >> >> >> >> On 18/06/20 20:55, Qais Yousef wrote: >> >> > There is a report that when uclamp is enabled, a netperf

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Qais Yousef
On 06/19/20 14:25, Valentin Schneider wrote: > > On 19/06/20 13:51, Qais Yousef wrote: > > On 06/19/20 11:36, Valentin Schneider wrote: > >> > >> On 18/06/20 20:55, Qais Yousef wrote: > >> > There is a report that when uclamp is enabled, a netperf UDP test > >> > regresses compared to a kernel

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Valentin Schneider
On 19/06/20 13:51, Qais Yousef wrote: > On 06/19/20 11:36, Valentin Schneider wrote: >> >> On 18/06/20 20:55, Qais Yousef wrote: >> > There is a report that when uclamp is enabled, a netperf UDP test >> > regresses compared to a kernel compiled without uclamp. >> > >> >

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Steven Rostedt
On Fri, 19 Jun 2020 13:51:48 +0100 Qais Yousef wrote: > > On 18/06/20 20:55, Qais Yousef wrote: > > > There is a report that when uclamp is enabled, a netperf UDP test > > > regresses compared to a kernel compiled without uclamp. > > > > > >

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Qais Yousef
On 06/19/20 12:57, Mel Gorman wrote: > On Fri, Jun 19, 2020 at 11:36:46AM +0100, Valentin Schneider wrote: > > >nouclamp uclamp > > > uclamp-static-key > > > Hmean send-64 162.43 ( 0.00%) 157.84 * -2.82%* > > >

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Qais Yousef
On 06/19/20 11:36, Valentin Schneider wrote: > > On 18/06/20 20:55, Qais Yousef wrote: > > There is a report that when uclamp is enabled, a netperf UDP test > > regresses compared to a kernel compiled without uclamp. > > > > https://lore.kernel.org/lkml/20200529100806.ga3...@suse.de/ > > > >

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Valentin Schneider
On 19/06/20 12:57, Mel Gorman wrote: > On Fri, Jun 19, 2020 at 11:36:46AM +0100, Valentin Schneider wrote: >> >nouclamp uclamp >> > uclamp-static-key >> > Hmean send-64 162.43 ( 0.00%) 157.84 * -2.82%* >> >

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Mel Gorman
On Fri, Jun 19, 2020 at 11:36:46AM +0100, Valentin Schneider wrote: > >nouclamp uclamp > > uclamp-static-key > > Hmean send-64 162.43 ( 0.00%) 157.84 * -2.82%* > > 163.39 * 0.59%* > > Hmean send-128

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Valentin Schneider
On 18/06/20 20:55, Qais Yousef wrote: > Reported-by: Mel Gorman > Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcounting") > Signed-off-by: Qais Yousef > Cc: Juri Lelli > Cc: Vincent Guittot > Cc: Dietmar Eggemann > Cc: Steven Rostedt > Cc: Ben Segall > Cc: Mel Gorman >

Re: [PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-19 Thread Valentin Schneider
On 18/06/20 20:55, Qais Yousef wrote: > There is a report that when uclamp is enabled, a netperf UDP test > regresses compared to a kernel compiled without uclamp. > > https://lore.kernel.org/lkml/20200529100806.ga3...@suse.de/ > ISTR the perennial form for those is: https://lkml.kernel.org/r/

[PATCH 2/2] sched/uclamp: Protect uclamp fast path code with static key

2020-06-18 Thread Qais Yousef
There is a report that when uclamp is enabled, a netperf UDP test regresses compared to a kernel compiled without uclamp. https://lore.kernel.org/lkml/20200529100806.ga3...@suse.de/ While investigating the root cause, there were no sign that the uclamp code is doing anything particularly