Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-06 Thread Peter Zijlstra
On Fri, May 05, 2017 at 02:59:16PM -0400, Steven Rostedt wrote: > On Fri, 5 May 2017 19:39:49 +0200 > Peter Zijlstra wrote: > > > On Fri, May 05, 2017 at 08:02:38AM -0400, Steven Rostedt wrote: > > > Actually what rteval does is basically 3 things. It runs cyclictest, > > >

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-06 Thread Peter Zijlstra
On Fri, May 05, 2017 at 02:59:16PM -0400, Steven Rostedt wrote: > On Fri, 5 May 2017 19:39:49 +0200 > Peter Zijlstra wrote: > > > On Fri, May 05, 2017 at 08:02:38AM -0400, Steven Rostedt wrote: > > > Actually what rteval does is basically 3 things. It runs cyclictest, > > > hackbench in a loop

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-05 Thread Steven Rostedt
On Fri, 5 May 2017 19:39:49 +0200 Peter Zijlstra wrote: > On Fri, May 05, 2017 at 08:02:38AM -0400, Steven Rostedt wrote: > > Actually what rteval does is basically 3 things. It runs cyclictest, > > hackbench in a loop and a kernel build in a loop. > > Of those, only

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-05 Thread Steven Rostedt
On Fri, 5 May 2017 19:39:49 +0200 Peter Zijlstra wrote: > On Fri, May 05, 2017 at 08:02:38AM -0400, Steven Rostedt wrote: > > Actually what rteval does is basically 3 things. It runs cyclictest, > > hackbench in a loop and a kernel build in a loop. > > Of those, only cyclictest uses RT tasks

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-05 Thread Peter Zijlstra
On Fri, May 05, 2017 at 08:02:38AM -0400, Steven Rostedt wrote: > Actually what rteval does is basically 3 things. It runs cyclictest, > hackbench in a loop and a kernel build in a loop. Of those, only cyclictest uses RT tasks and would end up poking at the bits you just changed. So just running

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-05 Thread Peter Zijlstra
On Fri, May 05, 2017 at 08:02:38AM -0400, Steven Rostedt wrote: > Actually what rteval does is basically 3 things. It runs cyclictest, > hackbench in a loop and a kernel build in a loop. Of those, only cyclictest uses RT tasks and would end up poking at the bits you just changed. So just running

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-05 Thread Steven Rostedt
On Fri, 5 May 2017 13:05:29 +0200 Peter Zijlstra wrote: > On Thu, May 04, 2017 at 03:03:55PM -0400, Steven Rostedt wrote: > > My test case is two fold. It basically just involves running rteval. > > > > One is to run it on latest mainline to make sure it doesn't crash. The

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-05 Thread Steven Rostedt
On Fri, 5 May 2017 13:05:29 +0200 Peter Zijlstra wrote: > On Thu, May 04, 2017 at 03:03:55PM -0400, Steven Rostedt wrote: > > My test case is two fold. It basically just involves running rteval. > > > > One is to run it on latest mainline to make sure it doesn't crash. The > > other is to

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-05 Thread Peter Zijlstra
On Thu, May 04, 2017 at 03:03:55PM -0400, Steven Rostedt wrote: > My test case is two fold. It basically just involves running rteval. > > One is to run it on latest mainline to make sure it doesn't crash. The > other is to backport it to the latest -rt patch, and see how well it > helps with

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-05 Thread Peter Zijlstra
On Thu, May 04, 2017 at 03:03:55PM -0400, Steven Rostedt wrote: > My test case is two fold. It basically just involves running rteval. > > One is to run it on latest mainline to make sure it doesn't crash. The > other is to backport it to the latest -rt patch, and see how well it > helps with

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Mike Galbraith
On Fri, 2017-05-05 at 06:26 +0200, Mike Galbraith wrote: > > To get rteval: > > > > $ git clone > > git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rteval.git > > $ cd rteval > > $ git checkout origin/v2/master > > ImportError: No module named ethtool > > Where does one find the

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Mike Galbraith
On Fri, 2017-05-05 at 06:26 +0200, Mike Galbraith wrote: > > To get rteval: > > > > $ git clone > > git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rteval.git > > $ cd rteval > > $ git checkout origin/v2/master > > ImportError: No module named ethtool > > Where does one find the

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Mike Galbraith
> To get rteval: > > $ git clone > git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rteval.git > $ cd rteval > $ git checkout origin/v2/master ImportError: No module named ethtool Where does one find the ethtool bits it seems to depend upon? -Mike

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Mike Galbraith
> To get rteval: > > $ git clone > git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rteval.git > $ cd rteval > $ git checkout origin/v2/master ImportError: No module named ethtool Where does one find the ethtool bits it seems to depend upon? -Mike

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Steven Rostedt
On Thu, 4 May 2017 20:42:00 +0200 Peter Zijlstra wrote: > On Thu, May 04, 2017 at 01:25:38PM -0400, Steven Rostedt wrote: > > > I think you want to write that as: > > > > > > struct root_domain *rd = rq->rd; > > > int cpu, next; > > > > > > /* comment */ > > > for

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Steven Rostedt
On Thu, 4 May 2017 20:42:00 +0200 Peter Zijlstra wrote: > On Thu, May 04, 2017 at 01:25:38PM -0400, Steven Rostedt wrote: > > > I think you want to write that as: > > > > > > struct root_domain *rd = rq->rd; > > > int cpu, next; > > > > > > /* comment */ > > > for (;;) { > > >

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Peter Zijlstra
On Thu, May 04, 2017 at 01:25:38PM -0400, Steven Rostedt wrote: > > I think you want to write that as: > > > > struct root_domain *rd = rq->rd; > > int cpu, next; > > > > /* comment */ > > for (;;) { > > if (rd->rto_cpu >= nr_cpu_ids) { > > If we go with your

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Peter Zijlstra
On Thu, May 04, 2017 at 01:25:38PM -0400, Steven Rostedt wrote: > > I think you want to write that as: > > > > struct root_domain *rd = rq->rd; > > int cpu, next; > > > > /* comment */ > > for (;;) { > > if (rd->rto_cpu >= nr_cpu_ids) { > > If we go with your

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Steven Rostedt
On Thu, 4 May 2017 17:32:56 +0200 Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote: > > static int rto_next_cpu(struct rq *rq) > > { > > int cpu; > > > > /* > > +* When starting the IPI RT pushing, the rto_cpu is set to

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Steven Rostedt
On Thu, 4 May 2017 17:32:56 +0200 Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote: > > static int rto_next_cpu(struct rq *rq) > > { > > int cpu; > > > > /* > > +* When starting the IPI RT pushing, the rto_cpu is set to nr_cpu_ids > > +*

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote: > static int rto_next_cpu(struct rq *rq) > { > int cpu; > > /* > + * When starting the IPI RT pushing, the rto_cpu is set to nr_cpu_ids > + * or greater. rt_next_cpu() will simply return the first CPU found

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote: > static int rto_next_cpu(struct rq *rq) > { > int cpu; > > /* > + * When starting the IPI RT pushing, the rto_cpu is set to nr_cpu_ids > + * or greater. rt_next_cpu() will simply return the first CPU found

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Steven Rostedt
On Thu, 4 May 2017 16:41:28 +0200 Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote: > > + /* Keep the loop going if the IPI is currently active */ > > + atomic_inc_return(>rd->rto_loop_next); > > What's the return for?

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Steven Rostedt
On Thu, 4 May 2017 16:41:28 +0200 Peter Zijlstra wrote: > On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote: > > + /* Keep the loop going if the IPI is currently active */ > > + atomic_inc_return(>rd->rto_loop_next); > > What's the return for? -ENOCONTEXT (too much cut from

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote: > + /* Keep the loop going if the IPI is currently active */ > + atomic_inc_return(>rd->rto_loop_next); What's the return for?

Re: [PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-05-04 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 11:47:32AM -0400, Steven Rostedt wrote: > + /* Keep the loop going if the IPI is currently active */ > + atomic_inc_return(>rd->rto_loop_next); What's the return for?

[PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-04-24 Thread Steven Rostedt
When a CPU lowers its priority (schedules out a high priority task for a lower priority one), a check is made to see if any other CPU has overloaded RT tasks (more than one). It checks the rto_mask to determine this and if so it will request to pull one of those tasks to itself if the non running

[PATCH tip/sched/core v2] sched/rt: Simplify the IPI rt balancing logic

2017-04-24 Thread Steven Rostedt
When a CPU lowers its priority (schedules out a high priority task for a lower priority one), a check is made to see if any other CPU has overloaded RT tasks (more than one). It checks the rto_mask to determine this and if so it will request to pull one of those tasks to itself if the non running