Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-03-24 Thread Peter Zijlstra
On Thu, Feb 25, 2016 at 11:20:34AM +0100, Peter Zijlstra wrote: > On Thu, Feb 25, 2016 at 10:07:06AM +, Juri Lelli wrote: > > Argh, this makes lot of sense to me. I've actually pondered a tree/list > > solution, but then decided to try the cumulative approach because it > > looked nicer. But it

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-25 Thread Peter Zijlstra
On Thu, Feb 25, 2016 at 10:07:06AM +, Juri Lelli wrote: > Argh, this makes lot of sense to me. I've actually pondered a tree/list > solution, but then decided to try the cumulative approach because it > looked nicer. But it contains holes, I'm afraid. As Luca already said, > GRUB shouldn't have

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-25 Thread Juri Lelli
Hi Peter, On 24/02/16 20:17, Peter Zijlstra wrote: > On Fri, Feb 12, 2016 at 06:05:30PM +0100, Peter Zijlstra wrote: > > Having two separate means of accounting this also feels more fragile > > than one would want. > > > > Let me think a bit about this. > > I think there's a fundamental problem

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-24 Thread Peter Zijlstra
On Wed, Feb 24, 2016 at 10:46:43PM +0100, luca abeni wrote: > > I arrived to the conclusion that for GRUB this is not a problem (but, > as usual, I might be wrong): GRUB just needs to track the per-runqueue > active/inactive utilization, Ah! indeed, my bad.

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-24 Thread luca abeni
Hi, On Wed, 24 Feb 2016 20:17:52 +0100 Peter Zijlstra wrote: > On Fri, Feb 12, 2016 at 06:05:30PM +0100, Peter Zijlstra wrote: > > Having two separate means of accounting this also feels more fragile > > than one would want. > > > > Let me think a bit about this. > > I think there's a fundamen

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-24 Thread Peter Zijlstra
On Fri, Feb 12, 2016 at 06:05:30PM +0100, Peter Zijlstra wrote: > Having two separate means of accounting this also feels more fragile > than one would want. > > Let me think a bit about this. I think there's a fundamental problem that makes the whole notion of per-rq accounting 'impossible'. On

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-23 Thread Juri Lelli
On 23/02/16 16:48, Peter Zijlstra wrote: > On Wed, Feb 10, 2016 at 01:42:40PM +, Juri Lelli wrote: > > > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > > > index 9503d59..0ee0ec2 100644 > > > > --- a/kernel/sched/core.c > > > > +++ b/kernel/sched/core.c > > > > @@ -2432,7 +2432,7

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-23 Thread Peter Zijlstra
On Wed, Feb 10, 2016 at 01:42:40PM +, Juri Lelli wrote: > > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > > index 9503d59..0ee0ec2 100644 > > > --- a/kernel/sched/core.c > > > +++ b/kernel/sched/core.c > > > @@ -2432,7 +2432,7 @@ static int dl_overflow(struct task_struct *p, > >

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-22 Thread luca abeni
On Fri, 19 Feb 2016 15:53:06 +0100 luca abeni wrote: [...] > > Please send the patches in a patch series. It is very hard to review > > patches that are attachments. And our scripts are made to apply > > patches from mailing lists. Having attachments just makes the job > > harder. > > Sorry about

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-19 Thread Steven Rostedt
On Fri, 19 Feb 2016 15:53:06 +0100 luca abeni wrote: > Sorry about that; I was in hurry, and I tried to do the quickest > thing... I'll resend the patches in a more appropriate way on Monday. Thanks! No rush. -- Steve

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-19 Thread luca abeni
On Fri, 19 Feb 2016 09:20:08 -0500 Steven Rostedt wrote: > On Fri, 19 Feb 2016 14:43:47 +0100 > luca abeni wrote: > > > > So, the first attached patch (to be applied over Juri's patch) just > > moves two __dl_sub_ac() and __dl_add_ac() invocations from > > dl_overflow() to deadline.c, using the

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-19 Thread Steven Rostedt
On Fri, 19 Feb 2016 14:43:47 +0100 luca abeni wrote: > So, the first attached patch (to be applied over Juri's patch) just > moves two __dl_sub_ac() and __dl_add_ac() invocations from > dl_overflow() to deadline.c, using the switched_from_dl() and > switched_to_dl() methods. This should cover th

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-19 Thread luca abeni
Hi all, On Wed, 10 Feb 2016 11:58:12 + Juri Lelli wrote: [...] > > > } else if (!dl_policy(policy) && task_has_dl_policy(p)) { > > > __dl_clear(dl_b, p->dl.dl_bw); > > > + __dl_sub_ac(task_rq(p), p->dl.dl_bw); > > > > Instead of adding __dl_add_ac() and __dl_sub_ac) calls

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-12 Thread Juri Lelli
On 12/02/16 18:05, Peter Zijlstra wrote: > On Thu, Feb 11, 2016 at 05:10:12PM +, Juri Lelli wrote: > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > > index 6368f43..1eccecf 100644 > > --- a/kernel/sched/deadline.c > > +++ b/kernel/sched/deadline.c > > > +static void swap_ta

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-12 Thread Peter Zijlstra
On Thu, Feb 11, 2016 at 05:10:12PM +, Juri Lelli wrote: > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > index 6368f43..1eccecf 100644 > --- a/kernel/sched/deadline.c > +++ b/kernel/sched/deadline.c > +static void swap_task_ac_bw(struct task_struct *p, > +

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread Luca Abeni
On Thu, 11 Feb 2016 09:25:46 -0500 Steven Rostedt wrote: > On Thu, 11 Feb 2016 14:05:45 +0100 > luca abeni wrote: > > > > Well, I never used the rq utilization to re-build the root_domain > > utilization (and I never played with root domains too much... :)... > > So, I do not really know. Ma

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread Juri Lelli
On 11/02/16 09:25, Steven Rostedt wrote: > On Thu, 11 Feb 2016 14:05:45 +0100 > luca abeni wrote: > > > > Well, I never used the rq utilization to re-build the root_domain > > utilization (and I never played with root domains too much... :)... > > So, I do not really know. Maybe the code shoul

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread Steven Rostedt
On Thu, 11 Feb 2016 14:05:45 +0100 luca abeni wrote: > Well, I never used the rq utilization to re-build the root_domain > utilization (and I never played with root domains too much... :)... > So, I do not really know. Maybe the code should do: > raw_spin_lock(&rq->lock); > raw_spi

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread luca abeni
On Thu, 11 Feb 2016 12:49:59 + Juri Lelli wrote: [...] > > > > > Luca, did you already face this problem (if I got it right) > > > > > and thought of a way to fix it? I'll go back and stare a bit > > > > > more at those paths. > > > > In my patch I took care of the first case (modifying > > >

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread Juri Lelli
On 11/02/16 13:40, Luca Abeni wrote: > On Thu, 11 Feb 2016 12:27:54 + > Juri Lelli wrote: > > > On 11/02/16 13:22, Luca Abeni wrote: > > > Hi Juri, > > > > > > On Thu, 11 Feb 2016 12:12:57 + > > > Juri Lelli wrote: > > > [...] > > > > I think we still have (at least) two problems: > > >

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread luca abeni
On Thu, 11 Feb 2016 12:27:54 + Juri Lelli wrote: > On 11/02/16 13:22, Luca Abeni wrote: > > Hi Juri, > > > > On Thu, 11 Feb 2016 12:12:57 + > > Juri Lelli wrote: > > [...] > > > I think we still have (at least) two problems: > > > > > > - select_task_rq_dl, if we select a different ta

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread Juri Lelli
On 11/02/16 13:22, Luca Abeni wrote: > Hi Juri, > > On Thu, 11 Feb 2016 12:12:57 + > Juri Lelli wrote: > [...] > > I think we still have (at least) two problems: > > > > - select_task_rq_dl, if we select a different target > > - select_task_rq might make use of select_fallback_rq, if > > c

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread luca abeni
Hi Juri, On Thu, 11 Feb 2016 12:12:57 + Juri Lelli wrote: [...] > I think we still have (at least) two problems: > > - select_task_rq_dl, if we select a different target > - select_task_rq might make use of select_fallback_rq, if > cpus_allowed changed after the task went to sleep > > Sec

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-11 Thread Juri Lelli
On 10/02/16 16:27, Juri Lelli wrote: > On 10/02/16 09:37, Steven Rostedt wrote: > > On Wed, 10 Feb 2016 11:32:58 + > > Juri Lelli wrote: > > [...] > > > > I applied this patch and patch 2 and hit this: > > [...] > > > > It's the warning you added in __dl_sub_ac(). > > > > OK. There a

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-10 Thread Juri Lelli
gt; > Best, > > > > - Juri > > > > --->8--- > > > > >From 62f70ca3051672dce209e8355cf5eddc9d825c2a Mon Sep 17 00:00:00 2001 > > From: Juri Lelli > > Date: Sat, 6 Feb 2016 12:41:09 + > > Subject: [PATCH 1/2] sched/deadline:

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-10 Thread Steven Rostedt
0 2001 > From: Juri Lelli > Date: Sat, 6 Feb 2016 12:41:09 + > Subject: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth > I applied this patch and patch 2 and hit this: [ 2298.134284] [ cut here ] [ 2298.138933] WARNING: CPU: 4

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-10 Thread Juri Lelli
On 10/02/16 13:48, Luca Abeni wrote: > Hi, > > On Wed, 10 Feb 2016 11:32:58 + > Juri Lelli wrote: > [...] > > From 62f70ca3051672dce209e8355cf5eddc9d825c2a Mon Sep 17 00:00:00 2001 > > From: Juri Lelli > > Date: Sat, 6 Feb 2016 12:41:09 +0000 > > Subje

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-10 Thread luca abeni
Hi, On Wed, 10 Feb 2016 11:32:58 + Juri Lelli wrote: [...] > From 62f70ca3051672dce209e8355cf5eddc9d825c2a Mon Sep 17 00:00:00 2001 > From: Juri Lelli > Date: Sat, 6 Feb 2016 12:41:09 + > Subject: [PATCH 1/2] sched/deadline: add per rq tracking of admitted > bandwidth

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-10 Thread Juri Lelli
On 10/02/16 12:43, Luca Abeni wrote: > Hi all, > Hi Luca, > On Wed, 10 Feb 2016 11:32:58 + > Juri Lelli wrote: > [...] > > @@ -2445,14 +2445,18 @@ static int dl_overflow(struct task_struct *p, > > int policy, if (dl_policy(policy) && !task_has_dl_policy(p) && > > !__dl_overflow(dl_b

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-10 Thread luca abeni
Hi all, On Wed, 10 Feb 2016 11:32:58 + Juri Lelli wrote: [...] > @@ -2445,14 +2445,18 @@ static int dl_overflow(struct task_struct *p, > int policy, if (dl_policy(policy) && !task_has_dl_policy(p) && > !__dl_overflow(dl_b, cpus, 0, new_bw)) { > __dl_add(dl_b, new_bw);

Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-10 Thread Juri Lelli
fix the problem with root domains. Best, - Juri --->8--- >From 62f70ca3051672dce209e8355cf5eddc9d825c2a Mon Sep 17 00:00:00 2001 From: Juri Lelli Date: Sat, 6 Feb 2016 12:41:09 +0000 Subject: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth Currently SCHED_DEADL

[PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth

2016-02-08 Thread Juri Lelli
Currently SCHED_DEADLINE scheduling policy tracks bandwidth of tasks that passed admission control at root_domain level only. This creates problems when such data structure(s) are destroyed, when we reconfigure scheduling domains for example. This is part one of two changes required to fix the pro