1Deadline monitors 2================= 3 4- Name: deadline 5- Type: container for multiple monitors 6- Author: Gabriele Monaco <gmonaco@redhat.com> 7 8Description 9----------- 10 11The deadline monitor is a set of specifications to describe the deadline 12scheduler behaviour. It includes monitors per scheduling entity (deadline tasks 13and servers) that work independently to verify different specifications the 14deadline scheduler should follow. 15 16Specifications 17-------------- 18 19Monitor nomiss 20~~~~~~~~~~~~~~ 21 22The nomiss monitor ensures dl entities get to run *and* run to completion 23before their deadline, although deferrable servers may not run. An entity is 24considered done if ``throttled``, either because it yielded or used up its 25runtime, or when it voluntarily starts ``sleeping``. 26The monitor includes a user configurable deadline threshold. If the total 27utilisation of deadline tasks is larger than 1, they are only guaranteed 28bounded tardiness. See Documentation/scheduler/sched-deadline.rst for more 29details. The threshold (module parameter ``nomiss.deadline_thresh``) can be 30configured to avoid the monitor to fail based on the acceptable tardiness in 31the system. Since ``dl_throttle`` is a valid outcome for the entity to be done, 32the minimum tardiness needs be 1 tick to consider the throttle delay, unless 33the ``HRTICK_DL`` scheduler feature is active. 34 35Servers have also an intermediate ``idle`` state, occurring as soon as no 36runnable task is available from ready or running where no timing constraint 37is applied. A server goes to sleep by stopping, there is no wakeup equivalent 38as the order of a server starting and replenishing is not defined, hence a 39server can run from sleeping without being ready:: 40 41 | 42 sched_wakeup v 43 dl_replenish;reset(clk) -- #=========================# 44 | H H dl_replenish;reset(clk) 45 +-----------> H H <--------------------+ 46 H H | 47 +- dl_server_stop ---- H ready H | 48 | +-----------------> H clk < DEADLINE_NS() H dl_throttle; | 49 | | H H is_defer == 1 | 50 | | sched_switch_in - H H -----------------+ | 51 | | | #=========================# | | 52 | | | | ^ | | 53 | | | dl_server_idle dl_replenish;reset(clk) | | 54 | | | v | | | 55 | | | +--------------+ | | 56 | | | +------ | | | | 57 | | | dl_server_idle | | dl_throttle | | 58 | | | | | idle | -----------------+ | | 59 | | | +-----> | | | | | 60 | | | | | | | | 61 | | | | | | | | 62 +--+--+---+--- dl_server_stop -- +--------------+ | | | 63 | | | | | ^ | | | 64 | | | | sched_switch_in dl_server_idle | | | 65 | | | | v | | | | 66 | | | | +---------- +---------------------+ | | | 67 | | | | sched_switch_in | | | | | 68 | | | | sched_wakeup | | | | | 69 | | | | dl_replenish; | running | -------+ | | | 70 | | | | reset(clk) | clk < DEADLINE_NS() | | | | | 71 | | | | +---------> | | dl_throttle | | | 72 | | | +----------------> | | | | | | 73 | | | +---------------------+ | | | | 74 | | sched_wakeup ^ sched_switch_suspend | | | | 75 v v dl_replenish;reset(clk) | dl_server_stop | | | | 76 +--------------+ | | v v v | 77 | | - sched_switch_in + | +---------------+ 78 | | <---------------------+ dl_throttle +-- | | 79 | sleeping | sched_wakeup | | throttled | 80 | | -- dl_server_stop dl_server_idle +-> | | 81 | | dl_server_idle sched_switch_suspend +---------------+ 82 +--------------+ <---------+ ^ 83 | | 84 +------ dl_throttle;is_constr_dl == 1 || is_defer == 1 ------+ 85