Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1518826

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

From Tommaso Cucinotta <tommaso.cucinotta@sssup.it>
Newsgroups linux.kernel
Subject Re: [RFD] sched/deadline: Support single CPU affinity
Date 2016-11-10 11:10 +0100
Message-ID <sBUsW-4g1-9@gated-at.bofh.it> (permalink)
References <sBSAN-2Uu-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On 10/11/2016 09:08, 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.
>
> Therefore the aim is to provide harder guarantees, similar to UP, for single
> CPU affine tasks. This then leads to a mixed criticality scheduling
> requirement for the CPU scheduler. G-EDF like for the non-affine (global)
> tasks and UP like for the single CPU tasks.
>
>
>
> ADMISSION CONTROL
>
> Do simple UP admission control on the CPU local tasks, and subtract the
> admitted bandwidth from the global total when doing global admission control.
>
>   single cpu:	U[n] := \Sum tl_u,n <= 1
>   global:	\Sum tg_u <= N - \Sum U[n]

+1, even with the current G-EDF: we need in the kernel a minimum permissive admission control simple enough to just avoid ill-formed workloads that pile-up forever without hope of recovering (as opposed to an AC that runs a complex test and doesn't allow you to deploy a task unless it's absolutely guaranteed to schedule its runtime by its deadline), even though it won't be perfect in terms of hard RT guarantees; the latter would require anyway more complex analysis techniques, considering also frequency of interrupts & the likes, and can be done in user-space by proper middleware, libraries, or even at design-time for static embedded systems where everything is known upfront and doesn't change often.

That said, it's good if in addition the mechanism behaves well from an analysis viewpoint (and we have a tardiness bound), the only problem being that there's a zillion proposals in research (see upcoming reply to Luca's).

Just a note: if you want to recover arbitrary task affinities, you can re-cast your above test like this:

for_each_processor(cpu)
   \sum U[t]/A[t] \leq 1 (or U_max), for each task t on cpu, with utilization U[t] and A[t] tasks overall in its affinity mask

(I'm not claiming we need scenarios with overlapping cpusets and G-EDF tasks, it's just in case it simplifies code)

	T.
-- 
Tommaso Cucinotta, Computer Engineering PhD
Associate Professor at the Real-Time Systems Laboratory (ReTiS)
Scuola Superiore Sant'Anna, Pisa, Italy
http://retis.sssup.it/people/tommaso

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFD] sched/deadline: Support single CPU affinity Peter Zijlstra <peterz@infradead.org> - 2016-11-10 09:10 +0100
  Re: [RFD] sched/deadline: Support single CPU affinity luca abeni <luca.abeni@unitn.it> - 2016-11-10 10:10 +0100
    Re: [RFD] sched/deadline: Support single CPU affinity Peter Zijlstra <peterz@infradead.org> - 2016-11-10 12:00 +0100
      Re: [RFD] sched/deadline: Support single CPU affinity luca abeni <luca.abeni@unitn.it> - 2016-11-10 13:30 +0100
    Re: [RFD] sched/deadline: Support single CPU affinity Tommaso Cucinotta <tommaso.cucinotta@sssup.it> - 2016-11-10 12:10 +0100
      Re: [RFD] sched/deadline: Support single CPU affinity luca abeni <luca.abeni@unitn.it> - 2016-11-10 15:40 +0100
  Re: [RFD] sched/deadline: Support single CPU affinity Tommaso Cucinotta <tommaso.cucinotta@sssup.it> - 2016-11-10 11:10 +0100
  Re: [RFD] sched/deadline: Support single CPU affinity Henrik Austad <henrik@austad.us> - 2016-11-10 13:30 +0100
    Re: [RFD] sched/deadline: Support single CPU affinity luca abeni <luca.abeni@unitn.it> - 2016-11-10 13:40 +0100
      Re: [RFD] sched/deadline: Support single CPU affinity Henrik Austad <henrik@austad.us> - 2016-11-10 14:00 +0100
        Re: [RFD] sched/deadline: Support single CPU affinity luca abeni <luca.abeni@unitn.it> - 2016-11-10 15:40 +0100
    Re: [RFD] sched/deadline: Support single CPU affinity Peter Zijlstra <peterz@infradead.org> - 2016-11-10 14:00 +0100

csiph-web