[RFC][PATCH 00/16] sched: SCHED_DEADLINE v6

2012-10-24 Thread Juri Lelli
schedstats for -deadline tasks. sched: add latency tracing for -deadline tasks. sched: drafted deadline inheritance logic. sched: add bandwidth management for sched_dl. sched: add sched_dl documentation. Harald Gustafsson (1): sched: add period support for -deadline tasks. Juri Lelli (3

[PATCH 01/16] math128: Introduce various 128bit primitives

2012-10-24 Thread Juri Lelli
From: Peter Zijlstra a.p.zijls...@chello.nl Grow rudimentary u128 support without relying on gcc/libgcc. Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de Cc: Andrew Morton a...@linux-foundation.org Cc: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Peter

[PATCH 02/16] math128, x86_64: Implement {mul,add}_u128 in 64bit asm

2012-10-24 Thread Juri Lelli
From: Peter Zijlstra a.p.zijls...@chello.nl Enable __int128 usage when available, if not, provide asm versions of mul_u64_u64 and add_u128. Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de Cc: H. Peter Anvin h...@zytor.com Cc: Andrew Morton a...@linux-foundation.org Cc:

[PATCH 03/16] sched: add sched_class-task_dead.

2012-10-24 Thread Juri Lelli
some cleanup actions. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |1 + kernel/sched/core.c |3 +++ 2 files changed, 4 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index 0dd42a0

[PATCH 04/16] sched: add extended scheduling interface.

2012-10-24 Thread Juri Lelli
to their already existing counterpart. Future patches that implement scheduling policies able to exploit the new data structure must also take care of modifying the *2() calls accordingly with their own purposes. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com

[PATCH 05/16] sched: SCHED_DEADLINE structures implementation.

2012-10-24 Thread Juri Lelli
the interactions between sched/dl and the other existing scheduling classes. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Michael Trimarchi mich...@amarulasolutions.com Signed-off-by: Fabio Checconi fa...@gandalf.sssup.it Signed-off-by: Juri Lelli juri.le...@gmail.com

[PATCH 07/16] sched: SCHED_DEADLINE avg_update accounting.

2012-10-24 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Make the core scheduler and load balancer aware of the load produced by -deadline tasks, by updating the moving average like for sched_rt. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched/dl.c

[PATCH 08/16] sched: add period support for -deadline tasks.

2012-10-24 Thread Juri Lelli
From: Harald Gustafsson harald.gustafs...@ericsson.com Make it possible to specify a period (different or equal than deadline) for -deadline tasks. Signed-off-by: Harald Gustafsson harald.gustafs...@ericsson.com Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le

[PATCH 10/16] sched: add latency tracing for -deadline tasks.

2012-10-24 Thread Juri Lelli
Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/trace/trace_sched_wakeup.c | 44 + kernel/trace/trace_selftest.c | 28 +-- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/kernel/trace/trace_sched_wakeup.c b

[PATCH 09/16] sched: add schedstats for -deadline tasks.

2012-10-24 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add some typical sched-debug output to dl_rq(s) and some schedstats to -deadline tasks. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h | 13 + kernel/sched/debug.c

[PATCH 11/16] rtmutex: turn the plist into an rb-tree.

2012-10-24 Thread Juri Lelli
of a task's pi-waiters and the list of tasks blocked on a pi-lock. Signed-off-by: Peter Zijlstra pet...@infradead.org Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/init_task.h | 10 +++ include/linux/rtmutex.h | 18 ++ include

[PATCH 12/16] sched: drafted deadline inheritance logic.

2012-10-24 Thread Juri Lelli
! :-) Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |9 - kernel/fork.c |1 + kernel/rtmutex.c | 13 +-- kernel/sched/core.c | 34 +++--- kernel/sched/dl.c | 91

[PATCH 14/16] sched: make dl_bw a sub-quota of rt_bw

2012-10-24 Thread Juri Lelli
as well. Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |1 - kernel/sched/core.c | 282 +++-- kernel/sched/dl.c |3 +- kernel/sched/sched.h | 22 ++-- kernel/sysctl.c |7 -- 5 files changed, 143

[PATCH 15/16] sched: speed up -dl pushes with a push-heap.

2012-10-24 Thread Juri Lelli
://retis.sssup.it/~jlelli/papers/Ospert11Lelli.pdf [2] http://www.spinics.net/lists/linux-rt-users/msg06778.html Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched/Makefile |2 +- kernel/sched/core.c |3 + kernel/sched/cpudl.c | 208

[PATCH 16/16] sched: add sched_dl documentation.

2012-10-24 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add in Documentation/scheduler/ some hints about the design choices, the usage and the future possible developments of the sched_dl scheduling class and of the SCHED_DEADLINE policy. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli

[PATCH 13/16] sched: add bandwidth management for sched_dl.

2012-10-24 Thread Juri Lelli
-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |8 + kernel/sched/core.c | 413 ++--- kernel/sched/dl.c | 45 +- kernel/sched/sched.h | 67 +++- kernel/sysctl.c | 14 ++ 5 files changed, 518 insertions(+), 29

[PATCH 06/16] sched: SCHED_DEADLINE SMP-related data structures logic.

2012-10-24 Thread Juri Lelli
with the latest deadline among the M executing ones. In order to facilitate these decisions, per-runqueue caching of the deadlines of the currently running and of the first ready task is used. Queued but not running tasks are also parked in another rb-tree to speed-up pushes. Signed-off-by: Juri Lelli

Re: [PATCH 02/16] math128, x86_64: Implement {mul,add}_u128 in 64bit asm

2012-10-24 Thread Juri Lelli
On 10/24/2012 03:27 PM, H. Peter Anvin wrote: On 10/24/2012 02:53 PM, Juri Lelli wrote: diff --git a/arch/x86/include/asm/math128.h b/arch/x86/include/asm/math128.h new file mode 100644 index 000..c0e2a6c --- /dev/null +++ b/arch/x86/include/asm/math128.h @@ -0,0 +1,39 @@ +#ifndef

Re: [PATCH 01/16] math128: Introduce various 128bit primitives

2012-10-24 Thread Juri Lelli
Adding H. Peter Anvin to the Cc list. Best, - Juri On 10/24/2012 02:53 PM, Juri Lelli wrote: From: Peter Zijlstra a.p.zijls...@chello.nl Grow rudimentary u128 support without relying on gcc/libgcc. Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de Cc: Andrew Morton

Re: [RFC][PATCH 00/16] sched: SCHED_DEADLINE v6

2012-10-25 Thread Juri Lelli
On 10/25/2012 12:18 AM, Ingo Molnar wrote: * Juri Lelli juri.le...@gmail.com wrote: kernel/sched/dl.c | 1650 I've got a stupid nit here: please make that deadline.c. Same for cpudl.c. Sure, no problems with that. Thanks and Regards

Re: [PATCH 01/16] math128: Introduce various 128bit primitives

2012-10-26 Thread Juri Lelli
Hi, first of all thanks to everybody for all this comments! On 10/26/2012 05:56 AM, Peter Zijlstra wrote: On Fri, 2012-10-26 at 12:44 +0200, Peter Zijlstra wrote: We can still have the user space interface handing in the information in nsec resolution, but it's reasonable to scale it down to

Re: [PATCH 01/16] math128: Introduce various 128bit primitives

2012-10-26 Thread Juri Lelli
On 10/26/2012 11:28 AM, Steven Rostedt wrote: On Fri, 2012-10-26 at 11:12 -0700, Juri Lelli wrote: - scale down (right by 10) incoming parameters as to do internal math with ~1us resolution (and scale up outgoing params) Would scaling down by 9 be sufficient? That way the resolution

[PATCH 01/14] sched: add sched_class-task_dead.

2013-02-11 Thread Juri Lelli
some cleanup actions. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |1 + kernel/sched/core.c |3 +++ 2 files changed, 4 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index d211247

[PATCH 04/14] sched: SCHED_DEADLINE SMP-related data structures logic.

2013-02-11 Thread Juri Lelli
with the latest deadline among the M executing ones. In order to facilitate these decisions, per-runqueue caching of the deadlines of the currently running and of the first ready task is used. Queued but not running tasks are also parked in another rb-tree to speed-up pushes. Signed-off-by: Juri Lelli

[PATCH 12/14] sched: make dl_bw a sub-quota of rt_bw

2013-02-11 Thread Juri Lelli
as well. Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |1 - kernel/sched/core.c | 282 ++- kernel/sched/deadline.c |3 +- kernel/sched/sched.h| 22 ++-- kernel/sysctl.c |7 -- 5 files changed

[PATCH 14/14] sched: add sched_dl documentation.

2013-02-11 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add in Documentation/scheduler/ some hints about the design choices, the usage and the future possible developments of the sched_dl scheduling class and of the SCHED_DEADLINE policy. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli

[PATCH 02/14] sched: add extended scheduling interface.

2013-02-11 Thread Juri Lelli
to their already existing counterpart. Future patches that implement scheduling policies able to exploit the new data structure must also take care of modifying the *2() calls accordingly with their own purposes. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com

[PATCH 06/14] sched: add period support for -deadline tasks.

2013-02-11 Thread Juri Lelli
From: Harald Gustafsson harald.gustafs...@ericsson.com Make it possible to specify a period (different or equal than deadline) for -deadline tasks. Signed-off-by: Harald Gustafsson harald.gustafs...@ericsson.com Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le

[PATCH 07/14] sched: add schedstats for -deadline tasks.

2013-02-11 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add some typical sched-debug output to dl_rq(s) and some schedstats to -deadline tasks. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h | 13 + kernel/sched/deadline.c

[PATCH 10/14] sched: drafted deadline inheritance logic.

2013-02-11 Thread Juri Lelli
! :-) Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |9 - kernel/fork.c |1 + kernel/rtmutex.c| 13 +-- kernel/sched/core.c | 34 +++--- kernel/sched/deadline.c | 91

[PATCH 13/14] sched: speed up -dl pushes with a push-heap.

2013-02-11 Thread Juri Lelli
://retis.sssup.it/~jlelli/papers/Ospert11Lelli.pdf [2] http://www.spinics.net/lists/linux-rt-users/msg06778.html Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched/Makefile |2 +- kernel/sched/core.c|3 + kernel/sched/cpudeadline.c | 208

[PATCH 11/14] sched: add bandwidth management for sched_dl.

2013-02-11 Thread Juri Lelli
-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |8 + kernel/sched/core.c | 431 --- kernel/sched/deadline.c | 50 +- kernel/sched/sched.h| 74 +++- kernel/sysctl.c | 14 ++ 5 files changed, 543

[PATCH 09/14] rtmutex: turn the plist into an rb-tree.

2013-02-11 Thread Juri Lelli
of a task's pi-waiters and the list of tasks blocked on a pi-lock. Signed-off-by: Peter Zijlstra pet...@infradead.org Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/init_task.h | 10 +++ include/linux/rtmutex.h | 18 ++ include

[PATCH 08/14] sched: add latency tracing for -deadline tasks.

2013-02-11 Thread Juri Lelli
Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/trace/trace_sched_wakeup.c | 44 + kernel/trace/trace_selftest.c | 28 +-- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/kernel/trace/trace_sched_wakeup.c b

[PATCH 05/14] sched: SCHED_DEADLINE avg_update accounting.

2013-02-11 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Make the core scheduler and load balancer aware of the load produced by -deadline tasks, by updating the moving average like for sched_rt. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched

[PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-02-11 Thread Juri Lelli
the interactions between sched/dl and the other existing scheduling classes. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Michael Trimarchi mich...@amarulasolutions.com Signed-off-by: Fabio Checconi fchecc...@gmail.com Signed-off-by: Juri Lelli juri.le...@gmail.com --- arch/arm

Re: [discussion]sched: a rough proposal to enable power saving in scheduler

2012-08-19 Thread Juri Lelli
the purpose of this discussion. Best Regards, - Juri Lelli -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 00/14] sched: SCHED_DEADLINE v9

2013-11-07 Thread Juri Lelli
tasks. Juri Lelli (3): sched: SCHED_DEADLINE SMP-related data structures logic. sched: make dl_bw a sub-quota of rt_bw sched: speed up -dl pushes with a push-heap. Peter Zijlstra (1): rtmutex: turn the plist into an rb-tree. Documentation/scheduler/sched-deadline.txt | 196 arch/arm

[PATCH 02/14] sched: add extended scheduling interface.

2013-11-07 Thread Juri Lelli
to their already existing counterpart. Future patches that implement scheduling policies able to exploit the new data structure must also take care of modifying the *2() calls accordingly with their own purposes. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com

[PATCH 04/14] sched: SCHED_DEADLINE SMP-related data structures logic.

2013-11-07 Thread Juri Lelli
with the latest deadline among the M executing ones. In order to facilitate these decisions, per-runqueue caching of the deadlines of the currently running and of the first ready task is used. Queued but not running tasks are also parked in another rb-tree to speed-up pushes. Signed-off-by: Juri Lelli

[PATCH 12/14] sched: make dl_bw a sub-quota of rt_bw

2013-11-07 Thread Juri Lelli
as well. Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched/deadline.h |2 + include/linux/sched/sysctl.h |2 - kernel/sched/core.c| 322 kernel/sched/deadline.c| 13 +- kernel/sched/sched.h

[PATCH 13/14] sched: speed up -dl pushes with a push-heap.

2013-11-07 Thread Juri Lelli
://retis.sssup.it/~jlelli/papers/Ospert11Lelli.pdf [2] http://www.spinics.net/lists/linux-rt-users/msg06778.html Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched/Makefile |2 +- kernel/sched/core.c|3 + kernel/sched/cpudeadline.c | 216

[PATCH 09/14] rtmutex: turn the plist into an rb-tree.

2013-11-07 Thread Juri Lelli
of a task's pi-waiters and the list of tasks blocked on a pi-lock. Signed-off-by: Peter Zijlstra pet...@infradead.org Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/init_task.h | 10 +++ include/linux/rtmutex.h | 18 ++ include

[PATCH 11/14] sched: add bandwidth management for sched_dl.

2013-11-07 Thread Juri Lelli
-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h|1 + include/linux/sched/sysctl.h | 13 ++ kernel/sched/core.c | 431 +++--- kernel/sched/deadline.c | 50 - kernel/sched/sched.h | 74 +++- kernel

[PATCH 10/14] sched: drafted deadline inheritance logic.

2013-11-07 Thread Juri Lelli
! :-) Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |8 +++- include/linux/sched/rt.h |1 + kernel/fork.c |1 + kernel/rtmutex.c | 14 +- kernel/sched/core.c

[PATCH 07/14] sched: add schedstats for -deadline tasks.

2013-11-07 Thread Juri Lelli
, if tasks are missing their deadlines and the entity of such anomalies). Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h | 13 + kernel/sched/deadline.c | 47

[PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-11-07 Thread Juri Lelli
the interactions between sched/dl and the other existing scheduling classes. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Michael Trimarchi mich...@amarulasolutions.com Signed-off-by: Fabio Checconi fchecc...@gmail.com Signed-off-by: Juri Lelli juri.le...@gmail.com --- arch/arm

[PATCH 01/14] sched: add sched_class-task_dead.

2013-11-07 Thread Juri Lelli
some cleanup actions. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched/core.c |3 +++ kernel/sched/sched.h |1 + 2 files changed, 4 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 5ac63c9..850a02c

[PATCH 06/14] sched: add period support for -deadline tasks.

2013-11-07 Thread Juri Lelli
-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |1 + kernel/sched/core.c | 15 --- kernel/sched/deadline.c | 10 +++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/include/linux

[PATCH 05/14] sched: SCHED_DEADLINE avg_update accounting.

2013-11-07 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Make the core scheduler and load balancer aware of the load produced by -deadline tasks, by updating the moving average like for sched_rt. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched

[PATCH 14/14] sched: add sched_dl documentation.

2013-11-07 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add in Documentation/scheduler/ some hints about the design choices, the usage and the future possible developments of the sched_dl scheduling class and of the SCHED_DEADLINE policy. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli

[PATCH 08/14] sched: add latency tracing for -deadline tasks.

2013-11-07 Thread Juri Lelli
Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/trace/trace_sched_wakeup.c | 44 + kernel/trace/trace_selftest.c | 28 +-- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/kernel/trace/trace_sched_wakeup.c b

Re: [PATCH 14/14] sched: add sched_dl documentation.

2013-11-08 Thread Juri Lelli
Hi, On 11/07/2013 05:44 PM, Randy Dunlap wrote: Hi, Just a few minor edits... Thanks! Best, - Juri On 11/07/13 05:47, Juri Lelli wrote: From: Dario Faggioli raist...@linux.it Add in Documentation/scheduler/ some hints about the design choices, the usage and the future possible

Re: [PATCH] rtmutex: Fix compare of waiter prio and task prio

2013-11-22 Thread Juri Lelli
On 11/21/2013 06:52 PM, Steven Rostedt wrote: The conversion of the rt_mutex from using plist to rbtree eliminated the use of the waiter-list_entry.prio, and instead used directly the waiter-task-prio. The problem with this is that the priority inheritance code relies on the prio of the

Re: [PATCH] cpuset: Fix memory allocator deadlock

2013-11-26 Thread Juri Lelli
forever waiting for the write side to complete. And this patch fixes it, thanks! Cc: John Stultz john.stu...@linaro.org Cc: Mel Gorman mgor...@suse.de Reported-by: Juri Lelli juri.le...@gmail.com Signed-off-by: Peter Zijlstra pet...@infradead.org Tested-by: Juri Lelli juri.le...@gmail.com

Re: [PATCH 08/14] sched: add latency tracing for -deadline tasks.

2013-11-27 Thread Juri Lelli
On 11/20/2013 10:33 PM, Steven Rostedt wrote: On Thu, 7 Nov 2013 14:43:42 +0100 Juri Lelli juri.le...@gmail.com wrote: +/* + * Semantic is like this: + * - wakeup tracer handles all tasks in the system, independently + *from their scheduling class

Re: [PATCH 08/14] sched: add latency tracing for -deadline tasks.

2013-11-27 Thread Juri Lelli
On 11/27/2013 03:16 PM, Steven Rostedt wrote: On Wed, 27 Nov 2013 14:43:45 +0100 Juri Lelli juri.le...@gmail.com wrote: diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index f76f8d6..ad94604 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-28 Thread Juri Lelli
schedtool still works since he doesn't know about size... Comments? Thanks, - Juri Author: Juri Lelli juri.le...@gmail.com Date: Thu Nov 28 11:07:47 2013 +0100 fixup: ABI changed, builds and runs diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h index

[PATCH 00/14] sched: SCHED_DEADLINE v8

2013-10-14 Thread Juri Lelli
tasks. Juri Lelli (3): sched: SCHED_DEADLINE SMP-related data structures logic. sched: make dl_bw a sub-quota of rt_bw sched: speed up -dl pushes with a push-heap. Peter Zijlstra (1): rtmutex: turn the plist into an rb-tree. Documentation/scheduler/sched-deadline.txt | 196 arch/arm

[PATCH 08/14] sched: add latency tracing for -deadline tasks.

2013-10-14 Thread Juri Lelli
Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/trace/trace_sched_wakeup.c | 44 + kernel/trace/trace_selftest.c | 28 +-- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/kernel/trace/trace_sched_wakeup.c b

[PATCH 14/14] sched: add sched_dl documentation.

2013-10-14 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add in Documentation/scheduler/ some hints about the design choices, the usage and the future possible developments of the sched_dl scheduling class and of the SCHED_DEADLINE policy. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli

[PATCH 06/14] sched: add period support for -deadline tasks.

2013-10-14 Thread Juri Lelli
From: Harald Gustafsson harald.gustafs...@ericsson.com Make it possible to specify a period (different or equal than deadline) for -deadline tasks. Signed-off-by: Harald Gustafsson harald.gustafs...@ericsson.com Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le

[PATCH 05/14] sched: SCHED_DEADLINE avg_update accounting.

2013-10-14 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Make the core scheduler and load balancer aware of the load produced by -deadline tasks, by updating the moving average like for sched_rt. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched

[PATCH 13/14] sched: speed up -dl pushes with a push-heap.

2013-10-14 Thread Juri Lelli
://retis.sssup.it/~jlelli/papers/Ospert11Lelli.pdf [2] http://www.spinics.net/lists/linux-rt-users/msg06778.html Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched/Makefile |2 +- kernel/sched/core.c|3 + kernel/sched/cpudeadline.c | 216

[PATCH 01/14] sched: add sched_class-task_dead.

2013-10-14 Thread Juri Lelli
some cleanup actions. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched/core.c |3 +++ kernel/sched/sched.h |1 + 2 files changed, 4 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 5ac63c9..850a02c

[PATCH 12/14] sched: make dl_bw a sub-quota of rt_bw

2013-10-14 Thread Juri Lelli
as well. Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched/sysctl.h |2 - kernel/sched/core.c | 285 -- kernel/sched/deadline.c |5 +- kernel/sched/sched.h | 24 ++-- kernel/sysctl.c |7

[PATCH 07/14] sched: add schedstats for -deadline tasks.

2013-10-14 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add some typical sched-debug output to dl_rq(s) and some schedstats to -deadline tasks. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h | 13 + kernel/sched/deadline.c

[PATCH 02/14] sched: add extended scheduling interface.

2013-10-14 Thread Juri Lelli
to their already existing counterpart. Future patches that implement scheduling policies able to exploit the new data structure must also take care of modifying the *2() calls accordingly with their own purposes. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com

[PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-10-14 Thread Juri Lelli
the interactions between sched/dl and the other existing scheduling classes. Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Michael Trimarchi mich...@amarulasolutions.com Signed-off-by: Fabio Checconi fchecc...@gmail.com Signed-off-by: Juri Lelli juri.le...@gmail.com --- arch/arm

[PATCH 10/14] sched: drafted deadline inheritance logic.

2013-10-14 Thread Juri Lelli
! :-) Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h|8 +++- include/linux/sched/rt.h |1 + kernel/fork.c|1 + kernel/rtmutex.c | 13 ++- kernel/sched/core.c | 36

[PATCH 04/14] sched: SCHED_DEADLINE SMP-related data structures logic.

2013-10-14 Thread Juri Lelli
with the latest deadline among the M executing ones. In order to facilitate these decisions, per-runqueue caching of the deadlines of the currently running and of the first ready task is used. Queued but not running tasks are also parked in another rb-tree to speed-up pushes. Signed-off-by: Juri Lelli

[PATCH 11/14] sched: add bandwidth management for sched_dl.

2013-10-14 Thread Juri Lelli
-by: Juri Lelli juri.le...@gmail.com --- include/linux/sched.h |1 + include/linux/sched/sysctl.h | 13 ++ kernel/rtmutex.c |1 + kernel/sched/core.c | 431 ++--- kernel/sched/deadline.c | 50

[PATCH 09/14] rtmutex: turn the plist into an rb-tree.

2013-10-14 Thread Juri Lelli
of a task's pi-waiters and the list of tasks blocked on a pi-lock. Signed-off-by: Peter Zijlstra pet...@infradead.org Signed-off-by: Dario Faggioli raist...@linux.it Signed-off-by: Juri Lelli juri.le...@gmail.com --- include/linux/init_task.h | 10 +++ include/linux/rtmutex.h | 18 ++ include

Re: [PATCH 00/14] sched: SCHED_DEADLINE v8

2013-10-14 Thread Juri Lelli
Ok, I forgot a space after the last Cc with git send-mail, sorry about that. Here the Cc list is right. Thanks, - Juri On 10/14/2013 12:43 PM, Juri Lelli wrote: Hello everyone, here we go with a new version of the SCHED_DEADLINE patchset (v8). I know that it has been a while since I

Re: [PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-10-14 Thread Juri Lelli
On 10/14/2013 01:10 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:35PM +0200, Juri Lelli wrote: +struct sched_dl_entity { +struct rb_node rb_node; +int nr_cpus_allowed; + Please see: 29baa7478ba4 sched: Move nr_cpus_allowed out of 'struct sched_rt_entity' Yes, I

Re: [PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-10-14 Thread Juri Lelli
On 10/14/2013 01:24 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:35PM +0200, Juri Lelli wrote: +/* + * We are being explicitly informed that a new instance is starting, + * and this means that: + * - the absolute deadline of the entity has to be placed at + *current time

Re: [PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-10-14 Thread Juri Lelli
On 10/14/2013 01:33 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:35PM +0200, Juri Lelli wrote: +static void replenish_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); + +/* + * We keep

Re: [PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-10-14 Thread Juri Lelli
On 10/14/2013 01:44 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:35PM +0200, Juri Lelli wrote: +static void update_curr_dl(struct rq *rq) +{ +struct task_struct *curr = rq-curr; +struct sched_dl_entity *dl_se = curr-dl; +u64 delta_exec; + +if (!dl_task(curr

Re: [PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-10-14 Thread Juri Lelli
On 10/14/2013 01:49 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:35PM +0200, Juri Lelli wrote: +/* + * Yield task semantic for -deadline tasks is: + * + * get off from the CPU until our next instance, with + * a new runtime. + */ Could you amend that comment with a reason

Re: [PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-10-14 Thread Juri Lelli
On 10/14/2013 07:34 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 06:58:51PM +0200, Juri Lelli wrote: On 10/14/2013 01:44 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:35PM +0200, Juri Lelli wrote: We discussed on this point in the past... Ah, completely forgot about

Re: [PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-10-14 Thread Juri Lelli
On 10/14/2013 01:51 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:35PM +0200, Juri Lelli wrote: +static void set_cpus_allowed_dl(struct task_struct *p, +const struct cpumask *new_mask) +{ +int weight = cpumask_weight(new_mask); + +BUG_ON

Re: [PATCH 06/14] sched: add period support for -deadline tasks.

2013-10-15 Thread Juri Lelli
On 10/14/2013 02:07 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:38PM +0200, Juri Lelli wrote: From: Harald Gustafsson harald.gustafs...@ericsson.com Make it possible to specify a period (different or equal than deadline) for -deadline tasks. Could we add a little blurb here

Re: [PATCH 07/14] sched: add schedstats for -deadline tasks.

2013-10-15 Thread Juri Lelli
On 10/14/2013 02:08 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:39PM +0200, Juri Lelli wrote: From: Dario Faggioli raist...@linux.it Add some typical sched-debug output to dl_rq(s) and some schedstats to -deadline tasks. Could you perhaps add a bit to the changelog explaining

Re: [PATCH 04/14] sched: SCHED_DEADLINE SMP-related data structures logic.

2013-10-15 Thread Juri Lelli
On 10/14/2013 02:03 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:36PM +0200, Juri Lelli wrote: +static inline void dl_set_overload(struct rq *rq) +{ +if (!rq-online) +return; + +cpumask_set_cpu(rq-cpu, rq-rd-dlo_mask); +/* + * Must be visible before

Re: [PATCH 12/14] sched: make dl_bw a sub-quota of rt_bw

2013-10-15 Thread Juri Lelli
On 10/14/2013 04:06 PM, Ingo Molnar wrote: * Juri Lelli juri.le...@gmail.com wrote: +#ifdef CONFIG_SMP +struct dl_bw *dl_b = cpu_rq(i)-rd-dl_bw; +#else +struct dl_bw *dl_b = cpu_rq(i)-dl.dl_bw; +#endif +#ifdef CONFIG_SMP +struct dl_bw *dl_b

Re: [PATCH 12/14] sched: make dl_bw a sub-quota of rt_bw

2013-10-15 Thread Juri Lelli
On 10/15/2013 12:26 PM, Peter Zijlstra wrote: On Tue, Oct 15, 2013 at 12:00:20PM +0200, Juri Lelli wrote: On 10/14/2013 04:06 PM, Ingo Molnar wrote: * Juri Lelli juri.le...@gmail.com wrote: +#ifdef CONFIG_SMP + struct dl_bw *dl_b = cpu_rq(i)-rd-dl_bw; +#else + struct

Re: [PATCH 04/14] sched: SCHED_DEADLINE SMP-related data structures logic.

2013-10-15 Thread Juri Lelli
On 10/15/2013 12:35 PM, Peter Zijlstra wrote: On Tue, Oct 15, 2013 at 11:36:17AM +0200, Juri Lelli wrote: On 10/14/2013 02:03 PM, Peter Zijlstra wrote: On Mon, Oct 14, 2013 at 12:43:36PM +0200, Juri Lelli wrote: +static inline void dl_set_overload(struct rq *rq) +{ + if (!rq-online

Re: [PATCH 01/14] sched: add sched_class-task_dead.

2013-11-12 Thread Juri Lelli
On 11/12/2013 06:19 PM, Steven Rostedt wrote: On Thu, 7 Nov 2013 14:43:35 +0100 Juri Lelli juri.le...@gmail.com wrote: From: Dario Faggioli raist...@linux.it Add a new function to the scheduling class interface. It is called at the end of a context switch, if the prev task is in TASK_DEAD

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-13 Thread Juri Lelli
On 11/12/2013 06:23 PM, Steven Rostedt wrote: On Thu, 7 Nov 2013 14:43:36 +0100 Juri Lelli juri.le...@gmail.com wrote: + * This is reflected by the actual fields of the sched_param2 structure: + * + * @sched_priority task's priority (might still be useful) + * @sched_deadline

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-13 Thread Juri Lelli
On 11/12/2013 06:32 PM, Steven Rostedt wrote: On Thu, 7 Nov 2013 14:43:36 +0100 Juri Lelli juri.le...@gmail.com wrote: +static int +do_sched_setscheduler2(pid_t pid, int policy, + struct sched_param2 __user *param2) +{ +struct sched_param2 lparam2

Re: [PATCH 03/14] sched: SCHED_DEADLINE structures implementation.

2013-11-13 Thread Juri Lelli
On 11/13/2013 03:31 AM, Steven Rostedt wrote: On Thu, 7 Nov 2013 14:43:37 +0100 Juri Lelli juri.le...@gmail.com wrote: From: Dario Faggioli raist...@linux.it --- /dev/null +++ b/include/linux/sched/deadline.h @@ -0,0 +1,24 @@ +#ifndef _SCHED_DEADLINE_H +#define _SCHED_DEADLINE_H

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-12-03 Thread Juri Lelli
On 11/30/2013 03:06 PM, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr __user *, attr) { - struct sched_param2 lp; + struct sched_attr lp

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-12-03 Thread Juri Lelli
On 12/03/2013 05:41 PM, Steven Rostedt wrote: On Tue, 03 Dec 2013 17:13:44 +0100 Juri Lelli juri.le...@gmail.com wrote: On 11/30/2013 03:06 PM, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: +SYSCALL_DEFINE2

[PATCH] sched/deadline: Switch CPU's presence test order

2014-02-24 Thread Juri Lelli
Commit 82b9580 (sched/deadline: Test for CPU's presence explicitly) changed how we check if a CPU returned by cpudeadline machinery is valid. But, we don't want to call cpu_present() if best_cpu is equal to -1. So, switch the order of tests inside WARN_ON(). Signed-off-by: Juri Lelli juri.le

Re: [RFC] sched/deadline: Prevent rt_time growth to infinity

2014-02-25 Thread Juri Lelli
On Sat, 22 Feb 2014 04:56:59 +0400 Kirill Tkhai tk...@yandex.ru wrote: On 21.02.2014 20:36, Juri Lelli wrote: On Fri, 21 Feb 2014 11:37:15 +0100 Peter Zijlstra pet...@infradead.org wrote: On Thu, Feb 20, 2014 at 02:16:00AM +0400, Kirill Tkhai wrote: Since deadline tasks share rt

[PATCH] sched/rt: fix rt timer activation/deactivation

2014-02-25 Thread Juri Lelli
Destroy rt bandwidth timer when rq has no more RT tasks, even when CONFIG_RT_GROUP_SCHED is not set. Signed-off-by: Juri Lelli juri.le...@gmail.com --- kernel/sched/rt.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index

Re: [PATCH] sched/deadline: Cleanup RT leftovers from {inc/dec}_dl_migration

2014-02-25 Thread Juri Lelli
On Tue, 25 Feb 2014 19:52:23 +0400 Kirill Tkhai ktk...@parallels.com wrote: In deadline class we do not have group scheduling. So, let's remove unnecessary X = X; equations. Thanks! - Juri Signed-off-by: Kirill Tkhai ktk...@parallels.com CC: Juri Lelli juri.le

Re: [PATCH]sched/core: Return possibility to set RT and DL classes back

2014-03-01 Thread Juri Lelli
() as it is. Regards, - Juri From 73bae0ad978db6e75f492eea9adff12ec9d6d2a3 Mon Sep 17 00:00:00 2001 From: Juri Lelli juri.le...@gmail.com Date: Sat, 1 Mar 2014 16:43:30 +0100 Subject: [PATCH] sched/core: restore __setscheduler() behavior Commit c365c29 introduced __setscheduler_params(), that is now

[PATCH] sched/deadline: Normal users can't set/change SCHED_DEADLINE policy

2014-03-03 Thread Juri Lelli
Deny the use of SCHED_DEADLINE policy to unprivileged users. Even if root users can set the policy for normal users, we don't want the latter to be able to change their parameters (safest behavior). Cc: Ingo Molnar mi...@redhat.com Cc: Peter Zijlstra pet...@infradead.org Signed-off-by: Juri Lelli

Re: [PATCH linux-next] sched: Fix broken setscheduler()

2014-03-06 Thread Juri Lelli
On Thu, 6 Mar 2014 12:58:25 +0100 Peter Zijlstra pet...@infradead.org wrote: On Wed, Mar 05, 2014 at 11:29:31PM -0500, Steven Rostedt wrote: I decided to run my tests on linux-next, and my wakeup_rt tracer was broken. After running a bisect, I found that the problem commit was:

  1   2   3   4   5   6   7   8   9   10   >