linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] CPU reclaiming for SCHED_DEADLINE
@ 2017-05-18 20:13 luca abeni
  2017-05-18 20:13 ` [PATCH 01/10] sched/deadline: track the active utilization luca abeni
                   ` (9 more replies)
  0 siblings, 10 replies; 26+ messages in thread
From: luca abeni @ 2017-05-18 20:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Juri Lelli, Claudio Scordino,
	Steven Rostedt, Tommaso Cucinotta, Daniel Bristot de Oliveira,
	Joel Fernandes, Mathieu Poirier, Luca Abeni

From: Luca Abeni <luca.abeni@santannapisa.it>

Hi all,

here is the next iteration of my patchset implementing CPU reclaiming
(using the GRUB algorithm[1]) for SCHED_DEADLINE (since I think the
patchset is now mature enough, I removed the "RFC" keyword from the
emails subjects).
Basically, this feature allows SCHED_DEADLINE tasks to consume more
than their reserved runtime, up to a maximum fraction of the CPU time
(so that other tasks are left some spare CPU time to execute), if this
does not break the guarantees of other SCHED_DEADLINE tasks.
The patchset applies on top of tip/master.


The implemented CPU reclaiming algorithm is based on tracking the
utilization U_act of active tasks (first 2 patches), and modifying the
runtime accounting rule (see patches 0004, 0008 and 0009).
The original GRUB algorithm is modified as described in [2,3] to support
multiple CPUs (the original algorithm only considered one single CPU,
this one tracks U_act per runqueue) and to leave an "unreclaimable"
fraction of CPU time to non SCHED_DEADLINE tasks (see patch 0005: the
original algorithm can consume 100% of the CPU time, starving all the
other tasks).
Patch 0003 uses the newly introduced "inactive timer" (introduced in
patch 0002) to fix dl_overflow() and __setparam_dl().
Patch 0006 allows to enable CPU reclaiming only on selected tasks.
Patches 0007, 0008 and 0009 fix an issue found by Daniel in a previous 
submission, by basing the GRUB reclaiming algorithm on the inactive
utilization U_inact as shown in [3]. Here, U_inact is computed as
the difference between the "rq utilization" (see patch 0007) and
U_act.
Patch 0010 adds some documentation contributed by Claudio.

The changes respect to v5 are mostly cosmetic and about comments or
documentation:
- I rearranged some code to avoid eccessive indentation,
  as requested by Peter
  (http://lkml.iu.edu/hypermail/linux/kernel/1703.3/00291.html)
- I modified dl_non_contending() to avoid doubts about use-after-free
  (http://lkml.iu.edu/hypermail/linux/kernel/1703.3/00291.html)
- I added a comment to migrate_task_rq_dl() explaining the locking
  (http://lkml.iu.edu/hypermail/linux/kernel/1703.3/00291.html)
- I added some braces to be compliant with the coding rules
- I renamed some functions and structure fields according to the
  feedback I received
- I added a big comment to document the GRUB states transition
- I changed grub_reclaim() (and the comments to that function) to
  make it more understandable
- I added some documentation by Claudio

Finally, I updated the patches to apply on top of tip/master.

[1] Lipari, G., & Baruah, S. (2000). Greedy reclamation of unused bandwidth in constant-bandwidth servers. In Real-Time 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
[3] Abeni, L., Lipari, G., Parri, A., & Sun, Y. (2016, April). Multicore CPU reclaiming: parallel or sequential?. In Proceedings of the 31st Annual ACM Symposium on Applied Computing (pp. 1877-1884). ACM..

 
Claudio Scordino (1):
  sched/deadline: documentation about GRUB reclaiming

Luca Abeni (9):
  sched/deadline: track the active utilization
  sched/deadline: improve the tracking of active utilization
  sched/deadline: fix the update of the total -deadline utilization
  sched/deadline: implement GRUB accounting
  sched/deadline: do not reclaim the whole CPU bandwidth
  sched/deadline: make GRUB a task's flag
  sched/deadline: track the "total rq utilization" too
  sched/deadline: base GRUB reclaiming on the inactive utilization
  sched/deadline: also reclaim bandwidth not used by dl tasks

 Documentation/scheduler/sched-deadline.txt | 168 +++++++++++
 include/linux/sched.h                      |  17 ++
 include/uapi/linux/sched.h                 |   1 +
 kernel/sched/core.c                        |  74 ++---
 kernel/sched/deadline.c                    | 448 +++++++++++++++++++++++++++--
 kernel/sched/sched.h                       |  66 ++++-
 6 files changed, 709 insertions(+), 65 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-06-08 13:47 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18 20:13 [PATCH 00/10] CPU reclaiming for SCHED_DEADLINE luca abeni
2017-05-18 20:13 ` [PATCH 01/10] sched/deadline: track the active utilization luca abeni
2017-06-08  8:31   ` Ingo Molnar
2017-06-08  8:43     ` Luca Abeni
2017-06-08  9:05       ` Juri Lelli
2017-06-08 13:36         ` Steven Rostedt
2017-06-08 13:47           ` Juri Lelli
2017-06-08  9:23   ` [tip:sched/core] sched/deadline: Track " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 02/10] sched/deadline: improve the tracking of " luca abeni
2017-06-08  9:24   ` [tip:sched/core] sched/deadline: Improve " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 03/10] sched/deadline: fix the update of the total -deadline utilization luca abeni
2017-06-08  9:24   ` [tip:sched/core] sched/deadline: Fix " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 04/10] sched/deadline: implement GRUB accounting luca abeni
2017-06-08  9:25   ` [tip:sched/core] sched/deadline: Implement " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 05/10] sched/deadline: do not reclaim the whole CPU bandwidth luca abeni
2017-06-08  9:25   ` [tip:sched/core] sched/deadline: Do " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 06/10] sched/deadline: make GRUB a task's flag luca abeni
2017-06-08  9:26   ` [tip:sched/core] sched/deadline: Make " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 07/10] sched/deadline: track the "total rq utilization" too luca abeni
2017-06-08  9:26   ` [tip:sched/core] sched/deadline: Track " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 08/10] sched/deadline: base GRUB reclaiming on the inactive utilization luca abeni
2017-06-08  9:27   ` [tip:sched/core] sched/deadline: Base " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 09/10] sched/deadline: also reclaim bandwidth not used by dl tasks luca abeni
2017-06-08  9:28   ` [tip:sched/core] sched/deadline: Reclaim " tip-bot for Luca Abeni
2017-05-18 20:13 ` [PATCH 10/10] sched/deadline: documentation about GRUB reclaiming luca abeni
2017-06-08  9:28   ` [tip:sched/core] sched/deadline: Add " tip-bot for Claudio Scordino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).