Re: [RFCv6 PATCH 09/10] sched: deadline: use deadline bandwidth in scale_rt_capacity

2015-12-15 Thread Luca Abeni
On 12/15/2015 01:58 PM, Vincent Guittot wrote: On 15 December 2015 at 09:50, Luca Abeni wrote: On 12/15/2015 05:59 AM, Vincent Guittot wrote: [...] So I don't think this is right. AFAICT this projects the WCET as the amount of time actually used by DL. This will, under many circumst

Re: [RFCv6 PATCH 09/10] sched: deadline: use deadline bandwidth in scale_rt_capacity

2015-12-15 Thread Luca Abeni
On Tue, 15 Dec 2015 14:42:29 +0100 Peter Zijlstra wrote: > On Tue, Dec 15, 2015 at 02:30:07PM +0100, Luca Abeni wrote: > > > >So I remember something else from the BFQ code, which also had to > > >track entries for the 0-lag stuff, and I just had a quick peek at > &

Re: [PATCH v3] sched/deadline: fix earliest_dl.next logic

2015-11-27 Thread Luca Abeni
Hi all, I ran some quick tests on this patch (because I was working on something related), and it seems to me that it triggers a bug. Here are some information: - I applied the patch to git master (to be sure that I did not corrupt the patch, I extracted it again with git format-patch, and pos

Question about prio_changed_dl()

2016-02-19 Thread luca abeni
Hi, when playing with the __dl_{add,sub}_ac() stuff recently posted by Juri, I found something that looks strange in prio_changed_dl(): static void prio_changed_dl(struct rq *rq, struct task_struct *p, int oldprio) { if (task_on_rq_queued(p) || rq->curr == p) {

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

2016-02-19 Thread luca abeni
patch 0003 (attached), which seems to be working correctly, but I am probably missing some important tests. Let me know what you think about it: I think it might be a nice simplification of the code, but as usual I might be missing something :) Thanks,

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 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 > > Currently SCHE

Re: Question about prio_changed_dl()

2016-02-27 Thread luca abeni
On Thu, 25 Feb 2016 15:52:02 +0100 Peter Zijlstra wrote: > On Thu, Feb 25, 2016 at 03:25:58PM +0100, luca abeni wrote: > > > > > (BTW, it seems to me that switched_to_dl() is never invoked, for > > > > some reason...) > > > > > > Hmm, it sh

Re: [PATCH 3/4] Remove dl_new

2016-02-24 Thread luca abeni
On Tue, 23 Feb 2016 16:42:49 +0100 Peter Zijlstra wrote: > On Mon, Feb 22, 2016 at 11:57:04AM +0100, Luca Abeni wrote: > > switched_to_dl() can be used instead > > This seems unrelated to the other patches, and looks like a nice > cleanup. Ok; I'll rebase the patch on m

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: Question about prio_changed_dl()

2016-02-25 Thread luca abeni
|| B) { > > } else if (A && !B) { > > } > > If A we'll take the first branch, if !A we will not satisfy the > second. Therefore the second branch will never be taken. > > Cc: Juri Lelli > Reported-by: luca abeni > Signed-off-by: Peter Zi

[PATCH 9/9] Documentation/scheduler/sched-deadline.txt: Split Section 3

2015-05-18 Thread Luca Abeni
Introduce 4 subsections to make Section 3 more readable. Signed-off-by: Luca Abeni --- Documentation/scheduler/sched-deadline.txt | 16 1 file changed, 16 insertions(+) diff --git a/Documentation/scheduler/sched-deadline.txt b/Documentation/scheduler/sched-deadline.txt

[PATCH 2/9] Documentation/scheduler/sched-deadline.txt: switch to American English

2015-05-18 Thread Luca Abeni
This file previously mixed American and British English; switch to American for consistency. Signed-off-by: Luca Abeni --- Documentation/scheduler/sched-deadline.txt | 32 ++-- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Documentation/scheduler

[PATCH 8/9] Documentation/scheduler/sched-deadline.txt: relationship between tasks' deadlines and scheduling deadlines

2015-05-18 Thread Luca Abeni
Clarify what is the relationship between tasks' parameters and scheduling parameters, explaining how to set the scheduling parameters so that all the absolute deadlines of a task are respected. Signed-off-by: Luca Abeni --- Documentation/scheduler/sched-deadline.txt | 14 +++-

[PATCH 0/9] SCHED_DEADLINE documentation update

2015-05-18 Thread Luca Abeni
) Converted my changes to American English Thanks, Luca Luca Abeni (8): Documentation/scheduler/sched-deadline.txt: switch to American English Documentation/scheduler/sched-deadline.txt: fix typos Documentation/scheduler/sched

[PATCH 6/9] Documentation/scheduler/sched-deadline.txt: Some notes on EDF schedulability

2015-05-18 Thread Luca Abeni
their computational complexity. Signed-off-by: Luca Abeni --- Documentation/scheduler/sched-deadline.txt | 45 ++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/Documentation/scheduler/sched-deadline.txt b/Documentation/scheduler/sched-deadline.txt index

[PATCH 7/9] Documentation/scheduler/sched-deadline.txt: add some references

2015-05-18 Thread Luca Abeni
Add a description of the Dhall's effect, some discussion about schedulability tests for global EDF, and references to real-time literature, Signed-off-by: Luca Abeni --- Documentation/scheduler/sched-deadline.txt | 73 +--- 1 file changed, 67 insertions(+), 6 dele

[PATCH 3/9] Documentation/scheduler/sched-deadline.txt: fix typos

2015-05-18 Thread Luca Abeni
Signed-off-by: Luca Abeni --- Documentation/scheduler/sched-deadline.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/scheduler/sched-deadline.txt b/Documentation/scheduler/sched-deadline.txt index af40d6c..0f51a1a 100644 --- a/Documentation/scheduler

[PATCH 5/9] Documentation/scheduler/sched-deadline.txt: remove _i from sum, max and min

2015-05-18 Thread Luca Abeni
The "_i" index is used in this document to to denote a particular task, so "sum_i", "max_i" and "min_i" might be confusing. Signed-off-by: Luca Abeni --- Documentation/scheduler/sched-deadline.txt | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 1/9] Documentation/scheduler/sched-deadline.txt: correct definition of density as C_i/min{D_i,P_i}

2015-05-18 Thread Luca Abeni
From: Zhiqiang Zhang C_i/min{D_i,T_i},where T_i is not referred before, should be substituted by C_i/min{D_i,P_i}. Signed-off-by: Zhiqiang Zhang --- Documentation/scheduler/sched-deadline.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 4/9] Documentation/scheduler/sched-deadline.txt: use consistent namings

2015-05-18 Thread Luca Abeni
The name "C_i" was used (without previously defining it) instead of "WCET_i". Signed-off-by: Luca Abeni --- Documentation/scheduler/sched-deadline.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/scheduler/sched-deadline.txt b/Doc

Re: Another SCHED_DEADLINE bug (with bisection and possible fix)

2015-02-02 Thread Luca Abeni
Hi Peter, On 01/31/2015 10:56 AM, Peter Zijlstra wrote: On Fri, Jan 30, 2015 at 10:35:02AM +, Juri Lelli wrote: So, we do the safe thing only in case of throttling. No, even for the !throttle aka running tasks. We only use dl_{runtime,deadline,period} for replenishment, until that time we

Re: Another SCHED_DEADLINE bug (with bisection and possible fix)

2015-01-30 Thread Luca Abeni
Hi Peter, On 01/28/2015 03:08 PM, Peter Zijlstra wrote: On Thu, Jan 15, 2015 at 02:35:46PM +0100, Luca Abeni wrote: >From what I understand we should either modify the tasks run/sleep stats when we change its parameters or we should schedule a delayed release of the bandwidth delta (when

[PATCH 0/2] SCHED_DEADLINE fixes

2014-12-17 Thread Luca Abeni
is a well known property for global EDF, but is not respected by SCHED_DEADLINE - see patch 0001 for more details). The second patch is IMHO also important, but less critical. Luca Abeni (2): Fix migration of SCHED_DEADLINE tasks Avoid double-accounting in case of missed deadlines kernel

[PATCH 2/2] Avoid double-accounting in case of missed deadlines

2014-12-17 Thread Luca Abeni
his patch fix this problem by throttling a SCHED_DEADLINE task only when its runtime becomes negative, and not modifying the runtime Signed-off-by: Luca Abeni --- kernel/sched/deadline.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/kernel/sched/deadli

[PATCH 1/2] Fix migration of SCHED_DEADLINE tasks

2014-12-17 Thread Luca Abeni
voking update_dl_entity() only in case of wakeup, or if this is a new SCHED_DEADLINE task. Signed-off-by: Luca Abeni --- kernel/sched/deadline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index e5db8c6..55af498 100644

Re: [RFC v2 1/7] Track the active utilisation

2016-04-05 Thread luca abeni
Hi Peter, first of all, thanks for all the reviews! On Tue, 5 Apr 2016 14:23:27 +0200 Peter Zijlstra wrote: [...] > > @@ -1218,6 +1242,9 @@ static void task_dead_dl(struct task_struct *p) > > /* XXX we should retain the bw until 0-lag */ > > dl_b->total_bw -= p->dl.dl_bw; > > raw_spi

Re: [RFC v2 2/7] Correctly track the active utilisation for migrating tasks

2016-04-05 Thread luca abeni
On Tue, 5 Apr 2016 14:24:25 +0200 Peter Zijlstra wrote: [...] > > @@ -1618,7 +1620,9 @@ static void pull_dl_task(struct rq *this_rq) > > resched = true; > > > > deactivate_task(src_rq, p, 0); > > + sub_running_bw(&p->dl, &src_rq->dl); > >

Re: [RFC v2 3/7] Improve the tracking of active utilisation

2016-04-05 Thread luca abeni
Hi Peter, On Tue, 5 Apr 2016 14:42:18 +0200 Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 05:12:29PM +0200, Luca Abeni wrote: > > +static void task_go_inactive(struct task_struct *p) > > +{ > > + struct sched_dl_entity *dl_se = &p->dl; > > + struct hrtim

Re: [RFC v2 3/7] Improve the tracking of active utilisation

2016-04-05 Thread luca abeni
Hi Peter, On Tue, 5 Apr 2016 14:42:42 +0200 Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 05:12:29PM +0200, Luca Abeni wrote: > > @@ -526,7 +575,18 @@ static void update_dl_entity(struct sched_dl_entity > > *dl_se, > > struct dl_rq *dl_rq = dl_rq_of_se(dl_se);

Re: [RFC v2 4/7] Fix the update of the total -deadline utilization

2016-04-05 Thread luca abeni
Hi Peter, On Tue, 5 Apr 2016 14:58:59 +0200 Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 05:12:30PM +0200, Luca Abeni wrote: > > + /* > > +* XXX this is slightly incorrect: when the task > > +* utilization decreases, we s

Re: [RFC v2 3/7] Improve the tracking of active utilisation

2016-04-05 Thread luca abeni
On Tue, 5 Apr 2016 16:48:03 +0200 Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 05:12:29PM +0200, Luca Abeni wrote: > > + /* > > +* We cannot use inactive_task_timer() to invoke sub_running_bw() > > +* at the 0-lag time, because the task could have been migr

Re: [RFC v2 3/7] Improve the tracking of active utilisation

2016-04-05 Thread luca abeni
On Tue, 5 Apr 2016 17:00:36 +0200 Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 05:12:29PM +0200, Luca Abeni wrote: > > +static void task_go_inactive(struct task_struct *p) > > +{ > > + struct sched_dl_entity *dl_se = &p->dl; > > + struct hrtim

Re: [RFC v2 3/7] Improve the tracking of active utilisation

2016-04-05 Thread luca abeni
On Tue, 5 Apr 2016 20:02:52 +0200 Peter Zijlstra wrote: > On Tue, Apr 05, 2016 at 07:56:57PM +0200, luca abeni wrote: > > > > > + migrate_active = hrtimer_active(&p->dl.inactive_timer); > > > > + if (migrate_active) > > &g

Re: [RFC v2 3/7] Improve the tracking of active utilisation

2016-04-05 Thread luca abeni
On Tue, 5 Apr 2016 21:24:24 +0200 luca abeni wrote: > On Tue, 5 Apr 2016 20:02:52 +0200 > Peter Zijlstra wrote: > > > On Tue, Apr 05, 2016 at 07:56:57PM +0200, luca abeni wrote: > > > > > > > + migrate_active = hrtimer_active(&p->dl.

Re: [RFC v2 3/7] Improve the tracking of active utilisation

2016-04-05 Thread luca abeni
On Tue, 5 Apr 2016 20:00:50 +0200 Peter Zijlstra wrote: > On Tue, Apr 05, 2016 at 07:56:57PM +0200, luca abeni wrote: > > > > + if (rq != cpu_rq(cpu)) { > > > > > > I don't think this is right, you want: > > > > > > if (task_cpu

[RFC v2 5/7] GRUB accounting

2016-04-01 Thread Luca Abeni
Signed-off-by: Luca Abeni --- kernel/sched/deadline.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index ca7910a..647d779 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -783,6 +783,19 @@ int

[RFC v2 7/7] Do not reclaim the whole CPU bandwidth

2016-04-01 Thread Luca Abeni
Original GRUB tends to reclaim 100% of the CPU time... And this allows a CPU hot to starve non-deadline tasks. To address this issue, allow the scheduler to reclaim only a specified fraction of CPU time. Signed-off-by: Luca Abeni --- kernel/sched/core.c | 4 kernel/sched/deadline.c | 7

[RFC v2 2/7] Correctly track the active utilisation for migrating tasks

2016-04-01 Thread Luca Abeni
igned-off-by: Luca Abeni --- kernel/sched/deadline.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 3c64ebf..05cfccb 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1530,7 +1530,9 @@

[RFC v2 6/7] Make GRUB a task's flag

2016-04-01 Thread Luca Abeni
Signed-off-by: Luca Abeni --- include/uapi/linux/sched.h | 1 + kernel/sched/core.c| 3 ++- kernel/sched/deadline.c| 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h index cc89dde..9279562 100644 --- a

[RFC v2 4/7] Fix the update of the total -deadline utilization

2016-04-01 Thread Luca Abeni
Now that the inactive timer can be armed to fire at the 0-lag time, it is possible to use inactive_task_timer() to update the total -deadline utilization (dl_b->total_bw) at the correct time, fixing dl_overflow() and __setparam_dl(). Signed-off-by: Luca Abeni --- kernel/sched/core.c |

[RFC v2 1/7] Track the active utilisation

2016-04-01 Thread Luca Abeni
The active utilisation here is defined as the total utilisation of the active (TASK_RUNNING) tasks queued on a runqueue. Hence, it is increased when a task wakes up and is decreased when a task blocks. This might need to be fixed / improved by decreasing the active utilisation at the so-called "0-l

[RFC v2 3/7] Improve the tracking of active utilisation

2016-04-01 Thread Luca Abeni
the so called "0-lag time". Signed-off-by: Luca Abeni --- include/linux/sched.h | 1 + kernel/sched/core.c | 1 + kernel/sched/deadline.c | 158 +--- kernel/sched/sched.h| 1 + 4 files changed, 139 insertions(+), 22 deletions(

[RFC v2 0/7] CPU reclaiming for SCHED_DEADLINE

2016-04-01 Thread Luca Abeni
o fix dl_overflow() and __setparam_dl(). Luca Abeni (7): Track the active utilisation Correctly track the active utilisation for migrating tasks Improve the tracking of active utilisation Fix the update of the total -deadline utilization GRUB accounting Make GRUB a task's flag

Re: [RFC][PATCH 00/13] SCHED_DEADLINE server infrastructure

2019-07-26 Thread luca abeni
Hi Peter, On Fri, 26 Jul 2019 16:54:09 +0200 Peter Zijlstra wrote: > Hi, > > So recently syzcaller ran into the big deadline/period issue (again), > and I figured I should at least propose a patch that puts limits on > that -- see Patch 1. > > During that discussion; SCHED_OTHER servers got me

Re: [RFC PATCH 3/6] sched/dl: Try better placement even for deadline tasks that do not block

2019-05-08 Thread luca abeni
Hi Juri, On Wed, 8 May 2019 10:01:16 +0200 Juri Lelli wrote: > Hi Luca, > > On 06/05/19 06:48, Luca Abeni wrote: > > From: luca abeni > > > > Currently, the scheduler tries to find a proper placement for > > SCHED_DEADLINE tasks when they are pushed out o

Re: [RFC PATCH 2/6] sched/dl: Capacity-aware migrations

2019-05-08 Thread luca abeni
On Wed, 8 May 2019 10:04:36 +0200 Juri Lelli wrote: > Hi Luca, > > On 06/05/19 06:48, Luca Abeni wrote: > > From: luca abeni > > > > Currently, the SCHED_DEADLINE scheduler uses a global EDF scheduling > > algorithm, migrating tasks to CPU cores without cons

Re: [RFC PATCH 4/6] sched/dl: Improve capacity-aware wakeup

2019-05-08 Thread luca abeni
On Wed, 8 May 2019 11:08:55 +0200 Juri Lelli wrote: > On 06/05/19 06:48, Luca Abeni wrote: > > From: luca abeni > > > > Instead of considering the "static CPU bandwidth" allocated to > > a SCHED_DEADLINE task (ratio between its maximum runtime and &g

Re: [RFC PATCH 4/6] sched/dl: Improve capacity-aware wakeup

2019-05-08 Thread luca abeni
Hi Juri, On Wed, 8 May 2019 14:05:26 +0200 Juri Lelli wrote: [...] > > > > + if ((rel_deadline < 0) || (rel_deadline * > > > > dl_se->dl_runtime < dl_se->dl_deadline * rem_runtime)) { > > > > + rel_deadline = dl_se->dl_deadline; > > > > + rem_runtime = dl_se->dl

Re: [RFC PATCH 4/6] sched/dl: Improve capacity-aware wakeup

2019-05-08 Thread luca abeni
Hi Juri, On Wed, 8 May 2019 15:10:18 +0200 Juri Lelli wrote: > On 08/05/19 14:47, luca abeni wrote: > > [...] > > > Notice that all this logic is used only to select one of the idle > > cores (instead of picking the first idle core, we select the less > > powerfu

[RFC PATCH 0/6] Capacity awareness for SCHED_DEADLINE

2019-05-05 Thread Luca Abeni
From: luca abeni The SCHED_DEADLINE scheduling policy currently has some issues with asymmetric CPU capacity architectures (such as ARM big.LITTLE). In particular, the admission control mechanism does not work correctly (because it considers all cores to have the same speed of the fastest core

[RFC PATCH 1/6] sched/dl: Improve deadline admission control for asymmetric CPU capacities

2019-05-05 Thread Luca Abeni
From: luca abeni Currently, the SCHED_DEADLINE admission control ensures that the sum of reserved CPU bandwidths is smaller than x * M, where the reserved CPU bandwidth of a SCHED_DEADLINE task is defined as the ratio between its runtime and its period, x is a user-definable percentage (95% by

[RFC PATCH 3/6] sched/dl: Try better placement even for deadline tasks that do not block

2019-05-05 Thread Luca Abeni
From: luca abeni Currently, the scheduler tries to find a proper placement for SCHED_DEADLINE tasks when they are pushed out of a core or when they wake up. Hence, if there is a single SCHED_DEADLINE task that never blocks and wakes up, such a task is never migrated to an appropriate CPU core

[RFC PATCH 4/6] sched/dl: Improve capacity-aware wakeup

2019-05-05 Thread Luca Abeni
From: luca abeni Instead of considering the "static CPU bandwidth" allocated to a SCHED_DEADLINE task (ratio between its maximum runtime and reservation period), try to use the remaining runtime and time to scheduling deadline. Signed-off-by: luca abeni --- kernel/sched/cpudead

[RFC PATCH 6/6] sched/dl: Try not to select a too fast core

2019-05-05 Thread Luca Abeni
From: luca abeni When a task can fit on multiple CPU cores, try to select the slowest core that is able to properly serve the task. This avoids useless future migrations, leaving the "fast cores" idle for more heavyweight tasks. Signed-off-by: luca abeni --- kernel/sched/cpudeadl

[RFC PATCH 5/6] sched/dl: If the task does not fit anywhere, select the fastest core

2019-05-05 Thread Luca Abeni
From: luca abeni When a task has a remaining runtime that cannot be served within the scheduling deadline by anyone of the idle cores, the task is doomed to miss its deadline (this can happen, because the admission control only guarantees a bounded tardiness, not the hard respect of all

[RFC PATCH 2/6] sched/dl: Capacity-aware migrations

2019-05-05 Thread Luca Abeni
From: luca abeni Currently, the SCHED_DEADLINE scheduler uses a global EDF scheduling algorithm, migrating tasks to CPU cores without considering the core capacity and the task utilization. This works well on homogeneous systems (SCHED_DEADLINE tasks are guaranteed to have a bounded tardiness

Re: [RFC PATCH 2/6] sched/dl: Capacity-aware migrations

2019-05-07 Thread luca abeni
Hi Quentin, On Tue, 7 May 2019 14:35:28 +0100 Quentin Perret wrote: > Hi Luca, > > On Monday 06 May 2019 at 06:48:32 (+0200), Luca Abeni wrote: > > +static inline int dl_task_fit(const struct sched_dl_entity *dl_se, > > + int cpu, u64 *c) &

Re: [RFC PATCH 1/6] sched/dl: Improve deadline admission control for asymmetric CPU capacities

2019-05-07 Thread luca abeni
On Tue, 7 May 2019 14:48:52 +0100 Quentin Perret wrote: > Hi Luca, > > On Monday 06 May 2019 at 06:48:31 (+0200), Luca Abeni wrote: > > diff --git a/drivers/base/arch_topology.c > > b/drivers/base/arch_topology.c index edfcf8d982e4..646d6d349d53 > > 100644 --- a/d

Re: [RFC PATCH 1/6] sched/dl: Improve deadline admission control for asymmetric CPU capacities

2019-05-07 Thread luca abeni
On Tue, 7 May 2019 15:31:27 +0100 Quentin Perret wrote: > On Tuesday 07 May 2019 at 16:25:23 (+0200), luca abeni wrote: > > On Tue, 7 May 2019 14:48:52 +0100 > > Quentin Perret wrote: > > > > > Hi Luca, > > > > > > On Monday 06 May 2019 at 06

Re: [RFC PATCH 2/6] sched/dl: Capacity-aware migrations

2019-05-07 Thread luca abeni
Hi, On Tue, 7 May 2019 15:10:50 +0100 Quentin Perret wrote: > On Monday 06 May 2019 at 06:48:32 (+0200), Luca Abeni wrote: > > static inline unsigned long cpu_bw_dl(struct rq *rq) > > { > > - return (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> > >

Re: [RFC PATCH 6/6] sched/dl: Try not to select a too fast core

2019-05-07 Thread luca abeni
Hi Quentin, On Tue, 7 May 2019 16:57:34 +0100 Quentin Perret wrote: > On Monday 06 May 2019 at 06:48:36 (+0200), Luca Abeni wrote: > > From: luca abeni > > > > When a task can fit on multiple CPU cores, try to select the slowest > > core that is able to properly

Re: [PATCH 4/5] sched/deadline: Cleanup on_dl_rq() handling

2019-07-31 Thread luca abeni
On Wed, 31 Jul 2019 18:32:47 +0100 Dietmar Eggemann wrote: [...] > static void dequeue_dl_entity(struct sched_dl_entity *dl_se) > { > +if (!on_dl_rq(dl_se)) > +return; > >>> > >>> Why allow double dequeue instead of WARN? > >> > >> As I was saying

Re: [PATCH 1/5] sched/deadline: Fix double accounting of rq/running bw in push_dl_task()

2019-07-26 Thread luca abeni
Hi Dietmar, On Fri, 26 Jul 2019 09:27:52 +0100 Dietmar Eggemann wrote: > push_dl_task() always calls deactivate_task() with flags=0 which sets > p->on_rq=TASK_ON_RQ_MIGRATING. Uhm... This is a recent change in the deactivate_task() behaviour, right? Because I tested SCHED_DEADLINE a lot, but I'

Re: [PATCH 5/5] sched/deadline: Use return value of SCHED_WARN_ON() in bw accounting

2019-07-26 Thread luca abeni
Hi Dietmar, On Fri, 26 Jul 2019 09:27:56 +0100 Dietmar Eggemann wrote: > To make the decision whether to set rq or running bw to 0 in underflow > case use the return value of SCHED_WARN_ON() rather than an extra if > condition. I think I tried this at some point, but if I remember well this sol

Re: [PATCH 1/5] sched/deadline: Fix double accounting of rq/running bw in push_dl_task()

2019-07-26 Thread luca abeni
Hi, On Fri, 26 Jul 2019 09:27:52 +0100 Dietmar Eggemann wrote: [...] > @@ -2121,17 +2121,13 @@ static int push_dl_task(struct rq *rq) > } > > deactivate_task(rq, next_task, 0); > - sub_running_bw(&next_task->dl, &rq->dl); > - sub_rq_bw(&next_task->dl, &rq->dl); > set_t

Re: [RFC PATCH 2/6] sched/dl: Capacity-aware migrations

2019-07-08 Thread luca abeni
Hi Dietmar, On Thu, 4 Jul 2019 14:05:22 +0200 Dietmar Eggemann wrote: > On 5/6/19 6:48 AM, Luca Abeni wrote: > > [...] > > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > > index 5b981eeeb944..3436f3d8fa8f 100644 > > --- a/kernel/sched/dea

Re: [RFC PATCH 3/6] sched/dl: Try better placement even for deadline tasks that do not block

2019-07-09 Thread luca abeni
Hi Peter, On Mon, 8 Jul 2019 15:55:36 +0200 Peter Zijlstra wrote: > On Mon, May 06, 2019 at 06:48:33AM +0200, Luca Abeni wrote: > > @@ -1223,8 +1250,17 @@ static void update_curr_dl(struct rq *rq) > > dl_se->dl_overrun = 1; > > > >

Re: WARN ON at kernel/sched/deadline.c task_non_contending

2019-03-22 Thread luca abeni
Hi Juri, On Fri, 22 Mar 2019 15:32:32 +0100 Juri Lelli wrote: [...] > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > > index 6a73e41a2016..43901fa3f269 100644 > > --- a/kernel/sched/deadline.c > > +++ b/kernel/sched/deadline.c > > @@ -252,7 +252,6 @@ static void task_non_cont

[PATCH] sched/deadline: correctly handle active 0-lag timers

2019-03-25 Thread luca abeni
non_contending() is called) while the 0-lag timer is still active. In this case, the safest thing to do is to immediately decrease the running bandwidth of the task, without trying to re-arm the 0-lag timer. Signed-off-by: luca abeni --- kernel/sched/deadline.c | 3 +-- 1 file changed, 1 insert

Re: [RFC v3 1/6] Track the active utilisation

2016-12-05 Thread luca abeni
Hi Peter, On Fri, 18 Nov 2016 15:23:59 +0100 Peter Zijlstra wrote: [...] > u64 running_bw; > > static void add_running_bw(struct sched_dl_entity *dl_se, struct > dl_rq *dl_rq) { > u64 old = dl_rq->running_bw; > > dl_rq->running_bw += dl_se->dl_bw; > SCHED_WARN_ON(dl_rq->

Re: [RFC v3 1/6] Track the active utilisation

2016-12-06 Thread luca abeni
On Tue, 6 Dec 2016 09:35:01 +0100 Peter Zijlstra wrote: > On Mon, Dec 05, 2016 at 11:30:05PM +0100, luca abeni wrote: > > Hi Peter, > > > > On Fri, 18 Nov 2016 15:23:59 +0100 > > Peter Zijlstra wrote: > > [...] > > > u64 running_bw; >

Re: [RFC v3 1/6] Track the active utilisation

2016-12-06 Thread luca abeni
ch, I re-used some code from include/asm-generic/bug.h, that has no copyright header, so I just added my signed-off-by (but I am not sure if this is the correct way to go). Luca From 74e67d61c4b98c2498880932b953c65e9653c121 Mon Sep 17 00:00:00 2001 From: Luca Abe

Re: [RFC v4 0/6] CPU reclaiming for SCHED_DEADLINE

2017-01-04 Thread Luca Abeni
2017-01-04 19:00 GMT+01:00, Daniel Bristot de Oliveira : [...] > Some tasks start to use more CPU time, while others seems to use less > CPU than it was reserved for them. See the task 14926, it is using > only 23.8 % of the CPU, which is less than its 10/30 reservation. What

Re: Doubt about push_dl_task() / find_lock_later_rq()

2017-01-04 Thread luca abeni
On Wed, 4 Jan 2017 15:49:35 +0100 luca abeni wrote: > Hi all, > > trying to debug a reclaiming issue discovered by Daniel, I find myself > confused by the push logic... Maybe I am misunderstanding something > very obvious, so I ask here: > > - push_dl_task() selects a t

Re: Doubt about push_dl_task() / find_lock_later_rq()

2017-01-05 Thread luca abeni
On Thu, 5 Jan 2017 12:48:38 +0100 Peter Zijlstra wrote: > On Thu, Jan 05, 2017 at 08:29:23AM +0100, luca abeni wrote: [...] > > I was confused by the fact that in some cases I saw > > rq->dl.earliest_dl.curr != rq->curr->dl.deadline > > > > I still do not

Re: [PATCH v2] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-06 Thread luca abeni
On Tue, 5 Jul 2016 17:58:30 +0100 Juri Lelli wrote: > On 05/07/16 12:47, Steven Rostedt wrote: > > On Tue, 5 Jul 2016 15:39:33 +0100 > > Juri Lelli wrote: > > > > return; > > > > > > > > > > /* > > > > > + * Use the scheduling parameters of the top > > > > > pi-waiter

Re: [PATCH v2] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-06 Thread luca abeni
On Tue, 5 Jul 2016 10:20:13 -0400 Steven Rostedt wrote: > On Wed, 29 Jun 2016 20:07:43 +0100 > Juri Lelli wrote: > > > > --- > > kernel/sched/deadline.c | 14 +++--- > > 1 file changed, 11 insertions(+), 3 deletions(-) > > > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadl

Re: [PATCH v2] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-04 Thread luca abeni
er > directly from inside that function. I did not have time to test this patch yet, but it still looks good to me. Thanks, Luca > > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Steven Rostedt > Cc: Luca Abeni > S

Re: [PATCH] sched/rt: RT_RUNTIME_GREED sched feature

2016-11-07 Thread Luca Abeni
On Mon, 7 Nov 2016 19:03:08 +0100 Tommaso Cucinotta wrote: > On 07/11/2016 14:51, Daniel Bristot de Oliveira wrote: > > Hi Tommaso, > > Hi, > > I'm cc-ing Luca for GRUB et al., pls find a few further notes below... Thanks Tommaso! I've seen the email on the linux-rt-users mailing list, and I'll

Re: [PATCH] sched/rt: RT_RUNTIME_GREED sched feature

2016-11-07 Thread luca abeni
Hi all, since GRUB reclaiming has been mentioned, I am going to add some comments on it :) On Mon, 7 Nov 2016 14:51:37 +0100 Daniel Bristot de Oliveira wrote: [...] > The sum of allocated runtime for all DL tasks will not to be greater > than RT throttling enforcement runtime. The DL scheduler

Re: [RFC v3 1/6] Track the active utilisation

2016-11-08 Thread Luca Abeni
Hi Juri, On Tue, 8 Nov 2016 17:56:35 + Juri Lelli wrote: [...] > > > > static void switched_to_dl(struct rq *rq, struct task_struct > > > > *p) { > > > > + add_running_bw(&p->dl, &rq->dl); > > > > > > > > /* If p is not queued we will update its parameters at > > > > next wak

Re: [RFC v3 1/6] Track the active utilisation

2016-11-08 Thread Luca Abeni
Hi again, On Tue, 8 Nov 2016 18:53:09 + Juri Lelli wrote: [...] > > > Also, AFAIU, do_exit() works on current and the TASK_DEAD case is > > > handled in finish_task_switch(), so I don't think we are taking > > > care of the "task is dying" condition. > > Ok, so I am missing something... The s

Re: [RFC v3 1/6] Track the active utilisation

2016-11-09 Thread luca abeni
On Tue, 8 Nov 2016 20:02:29 + Juri Lelli wrote: [...] > > > So, it actually matters for next patch, > > > not here. But, maybe we want to do things clean from start? > > You mean, because patch 2/6 adds > > + if (hrtimer_active(&p->dl.inactive_timer)) { > > + raw_spin_loc

Re: [RFC v3 1/6] Track the active utilisation

2016-11-09 Thread luca abeni
On Tue, 8 Nov 2016 17:56:35 + Juri Lelli wrote: [...] > > > > @@ -947,14 +965,19 @@ static void enqueue_task_dl(struct rq *rq, struct > > > > task_struct *p, int flags) > > > > return; > > > > } > > > > > > > > + if (p->on_rq == TASK_ON_RQ_MIGRATING) > > > > +

About group scheduling for SCHED_DEADLINE

2016-10-09 Thread Luca Abeni
Hi all, after the SCHED_DEADLINE TODO page (https://github.com/jlelli/sched-deadline/wiki/TODOs) has been published, there has been a private exchange of emails about the "group scheduling (cgroups)" / "hierarchical DEADLINE server for FIFO/RR" item. I'd like to start a discussion about this topic

Re: [RFD] sched/deadline: Support single CPU affinity

2016-11-10 Thread luca abeni
Hi Peter, On Thu, 10 Nov 2016 09:08:07 +0100 Peter Zijlstra wrote: > Add support for single CPU affinity to SCHED_DEADLINE; the supposed > reason for wanting single CPU affinity is better QoS than provided by > G-EDF. This looks very interesting, thanks for sharing! I have some "theoretical" com

Re: [RFC v3 2/6] Improve the tracking of active utilisation

2016-11-10 Thread luca abeni
On Thu, 10 Nov 2016 11:56:10 + Juri Lelli wrote: > On 10/11/16 10:04, Juri Lelli wrote: > > On 02/11/16 03:35, Luca Abeni wrote: > > > On Tue, 1 Nov 2016 22:46:33 +0100 > > > luca abeni wrote: > > > [...] > > > > > > @@ -1

Re: [RFD] sched/deadline: Support single CPU affinity

2016-11-10 Thread luca abeni
Hi Peter, On Thu, 10 Nov 2016 11:59:18 +0100 Peter Zijlstra wrote: [...] > > > MIXED CRITICALITY SCHEDULING > > > > > > Since we want to provide better guarantees for single CPU affine > > > tasks than the G-EDF scheduler provides for the single CPU tasks, > > > we need to somehow alter the s

Re: [RFD] sched/deadline: Support single CPU affinity

2016-11-10 Thread luca abeni
Hi Henrik, On Thu, 10 Nov 2016 13:21:00 +0100 Henrik Austad wrote: > On Thu, Nov 10, 2016 at 09:08:07AM +0100, Peter Zijlstra wrote: [...] > > We define the time to fail as: > > > > ttf(t) := t_d - t_b; where > > > > t_d is t's absolute deadline > > t_b is t's remaining budget > > >

Re: [RFC v3 2/6] Improve the tracking of active utilisation

2016-11-10 Thread luca abeni
On Thu, 10 Nov 2016 12:34:15 + Juri Lelli wrote: [...] > > Ok; I'll think about some possible solution for this race... If I do > > not find any simple way to solve it, I'll add a "contending" flag, > > which allows to know if the inactive timer handler already executed > > or not. > > > >

Re: [RFD] sched/deadline: Support single CPU affinity

2016-11-10 Thread luca abeni
On Thu, 10 Nov 2016 12:03:47 +0100 Tommaso Cucinotta wrote: > On 10/11/2016 10:06, luca abeni wrote: > > is equivalent to the "least laxity first" (LLF) algorithm. > > Giving precedence to tasks with 0 laxity is a technique that is > > often used to improve the sc

Re: [RFD] sched/deadline: Support single CPU affinity

2016-11-10 Thread luca abeni
Hi Henrik, On Thu, 10 Nov 2016 13:56:35 +0100 Henrik Austad wrote: > On Thu, Nov 10, 2016 at 01:38:40PM +0100, luca abeni wrote: > > Hi Henrik, > > Hi Luca, > > > On Thu, 10 Nov 2016 13:21:00 +0100 > > Henrik Austad wrote: > > > On Thu, Nov 10, 2

Re: [RFC v3 1/6] Track the active utilisation

2016-11-01 Thread luca abeni
ss a similar change should be applied to the subjects of all the other patches, right? > > On 24/10/16 16:06, Luca Abeni wrote: > > The active utilisation here is defined as the total utilisation of the > > s/The active/Active/ > s/here// > s/of the active/of ac

Re: [RFC v3 2/6] Improve the tracking of active utilisation

2016-11-01 Thread luca abeni
Hi Juri, On Tue, 1 Nov 2016 16:46:04 + Juri Lelli wrote: [...] > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > > index 3d95c1d..80d1541 100644 > > --- a/kernel/sched/deadline.c > > +++ b/kernel/sched/deadline.c > > @@ -47,6 +47,7 @@ static void add_running_bw(struct sched

Re: [RFC v3 2/6] Improve the tracking of active utilisation

2016-11-01 Thread luca abeni
On Tue, 1 Nov 2016 22:46:33 +0100 luca abeni wrote: [...] > > > @@ -1074,6 +1161,14 @@ select_task_rq_dl(struct task_struct *p, int cpu, > > > int sd_flag, int flags) > > > } > > > rcu_read_unlock(); > > > > > > + rq = ta

Re: [RFC v3 2/6] Improve the tracking of active utilisation

2016-11-01 Thread luca abeni
On Mon, 24 Oct 2016 16:06:34 +0200 Luca Abeni wrote: [...] > @@ -514,7 +556,20 @@ static void update_dl_entity(struct sched_dl_entity > *dl_se, > struct dl_rq *dl_rq = dl_rq_of_se(dl_se); > struct rq *rq = rq_of_dl_rq(dl_rq); > > - add_running_bw(dl_se,

[RFC v3 0/6] CPU reclaiming for SCHED_DEADLINE

2016-10-24 Thread Luca Abeni
Systems, 2000. Euromicro RTS 2000. 12th Euromicro Conference on (pp. 193-200). IEEE. [2] Abeni, L., Lelli, J., Scordino, C., & Palopoli, L. (2014, October). Greedy CPU reclaiming for SCHED DEADLINE. In Proceedings of the Real-Time Linux Workshop (RTLWS), Dusseldorf, Germany. Luca Abeni (6):

[RFC v3 1/6] Track the active utilisation

2016-10-24 Thread Luca Abeni
0-lag time" instead of when the task blocks. Signed-off-by: Juri Lelli Signed-off-by: Luca Abeni --- kernel/sched/deadline.c | 39 ++- kernel/sched/sched.h| 6 ++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/kernel/sched/deadline.c

[RFC v3 4/6] GRUB accounting

2016-10-24 Thread Luca Abeni
l() to implement the GRUB rule. Signed-off-by: Luca Abeni --- kernel/sched/deadline.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 4d3545b..fa10fcd 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline

<    1   2   3   4   >