€•qŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ,/translations/zh_CN/scheduler/sched-rt-group”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/zh_TW/scheduler/sched-rt-group”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/scheduler/sched-rt-group”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/scheduler/sched-rt-group”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/scheduler/sched-rt-group”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/sp_SP/scheduler/sched-rt-group”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒReal-Time group scheduling”h]”hŒReal-Time group scheduling”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒF/var/lib/git/docbuild/linux/Documentation/scheduler/sched-rt-group.rst”h KubhŒcomment”“”)”}”(hŒ¸CONTENTS 0. WARNING 1. Overview 1.1 The problem 1.2 The solution 2. The interface 2.1 System-wide settings 2.2 Default behaviour 2.3 Basis for grouping tasks 3. Future plans”h]”hŒ¸CONTENTS 0. WARNING 1. Overview 1.1 The problem 1.2 The solution 2. The interface 2.1 System-wide settings 2.2 Default behaviour 2.3 Basis for grouping tasks 3. Future plans”…””}”hh¹sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h·hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ 0. WARNING”h]”hŒ 0. WARNING”…””}”(hhÌhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hhÉhžhhŸh¶h KubhŒ block_quote”“”)”}”(hŒ€Fiddling with these settings can result in an unstable system, the knobs are root only and assumes root knows what he is doing. ”h]”hŒ paragraph”“”)”}”(hŒFiddling with these settings can result in an unstable system, the knobs are root only and assumes root knows what he is doing.”h]”hŒFiddling with these settings can result in an unstable system, the knobs are root only and assumes root knows what he is doing.”…””}”(hhâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h KhhÜubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh¶h KhhÉhžhubhá)”}”(hŒ Most notable:”h]”hŒ Most notable:”…””}”(hhöhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h KhhÉhžhubhÛ)”}”(hXÀ* very small values in sched_rt_period_us can result in an unstable system when the period is smaller than either the available hrtimer resolution, or the time it takes to handle the budget refresh itself. * very small values in sched_rt_runtime_us can result in an unstable system when the runtime is so small the system has difficulty making forward progress (NOTE: the migration thread and kstopmachine both are real-time processes). ”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒÌvery small values in sched_rt_period_us can result in an unstable system when the period is smaller than either the available hrtimer resolution, or the time it takes to handle the budget refresh itself. ”h]”há)”}”(hŒËvery small values in sched_rt_period_us can result in an unstable system when the period is smaller than either the available hrtimer resolution, or the time it takes to handle the budget refresh itself.”h]”hŒËvery small values in sched_rt_period_us can result in an unstable system when the period is smaller than either the available hrtimer resolution, or the time it takes to handle the budget refresh itself.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj ubj)”}”(hŒåvery small values in sched_rt_runtime_us can result in an unstable system when the runtime is so small the system has difficulty making forward progress (NOTE: the migration thread and kstopmachine both are real-time processes). ”h]”há)”}”(hŒävery small values in sched_rt_runtime_us can result in an unstable system when the runtime is so small the system has difficulty making forward progress (NOTE: the migration thread and kstopmachine both are real-time processes).”h]”hŒävery small values in sched_rt_runtime_us can result in an unstable system when the runtime is so small the system has difficulty making forward progress (NOTE: the migration thread and kstopmachine both are real-time processes).”…””}”(hj+hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h Khj'ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jhŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh¶h KhhÉhžhubeh}”(h]”Œwarning”ah ]”h"]”Œ 0. warning”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ 1. Overview”h]”hŒ 1. Overview”…””}”(hjXhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjUhžhhŸh¶h K$ubh¢)”}”(hhh]”(h§)”}”(hŒ1.1 The problem”h]”hŒ1.1 The problem”…””}”(hjihžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjfhžhhŸh¶h K(ubhá)”}”(hXÅReal-time scheduling is all about determinism, a group has to be able to rely on the amount of bandwidth (eg. CPU time) being constant. In order to schedule multiple groups of real-time tasks, each group must be assigned a fixed portion of the CPU time available. Without a minimum guarantee a real-time group can obviously fall short. A fuzzy upper limit is of no use since it cannot be relied upon. Which leaves us with just the single fixed portion.”h]”hXÅReal-time scheduling is all about determinism, a group has to be able to rely on the amount of bandwidth (eg. CPU time) being constant. In order to schedule multiple groups of real-time tasks, each group must be assigned a fixed portion of the CPU time available. Without a minimum guarantee a real-time group can obviously fall short. A fuzzy upper limit is of no use since it cannot be relied upon. Which leaves us with just the single fixed portion.”…””}”(hjwhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K*hjfhžhubeh}”(h]”Œ the-problem”ah ]”h"]”Œ1.1 the problem”ah$]”h&]”uh1h¡hjUhžhhŸh¶h K(ubh¢)”}”(hhh]”(h§)”}”(hŒ1.2 The solution”h]”hŒ1.2 The solution”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h K2ubhá)”}”(hŒÔCPU time is divided by means of specifying how much time can be spent running in a given period. We allocate this "run time" for each real-time group which the other real-time groups will not be permitted to use.”h]”hŒØCPU time is divided by means of specifying how much time can be spent running in a given period. We allocate this “run time†for each real-time group which the other real-time groups will not be permitted to use.”…””}”(hjžhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K4hjhžhubhá)”}”(hŒ«Any time not allocated to a real-time group will be used to run normal priority tasks (SCHED_OTHER). Any allocated run time not used will also be picked up by SCHED_OTHER.”h]”hŒ«Any time not allocated to a real-time group will be used to run normal priority tasks (SCHED_OTHER). Any allocated run time not used will also be picked up by SCHED_OTHER.”…””}”(hj¬hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K8hjhžhubhá)”}”(hXILet's consider an example: a frame fixed real-time renderer must deliver 25 frames a second, which yields a period of 0.04s per frame. Now say it will also have to play some music and respond to input, leaving it with around 80% CPU time dedicated for the graphics. We can then give this group a run time of 0.8 * 0.04s = 0.032s.”h]”hXKLet’s consider an example: a frame fixed real-time renderer must deliver 25 frames a second, which yields a period of 0.04s per frame. Now say it will also have to play some music and respond to input, leaving it with around 80% CPU time dedicated for the graphics. We can then give this group a run time of 0.8 * 0.04s = 0.032s.”…””}”(hjºhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K 0.05 inorder to preserve bandwidth for fair dl_server. For accurate value check average of runtime/period in /sys/kernel/debug/sched/fair_server/cpuX/ ”h]”(j>)”}”(hŒ%/proc/sys/kernel/sched_rt_runtime_us:”h]”hŒ%/proc/sys/kernel/sched_rt_runtime_us:”…””}”(hjphžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j=hŸh¶h KlhjlubjN)”}”(hhh]”(há)”}”(hX€A global limit on how much time real-time scheduling may use. This is always less or equal to the period_us, as it denotes the time allocated from the period_us for the real-time tasks. Without CONFIG_RT_GROUP_SCHED enabled, this only serves for admission control of deadline tasks. With CONFIG_RT_GROUP_SCHED=y it also signifies the total bandwidth available to all real-time groups.”h]”hX€A global limit on how much time real-time scheduling may use. This is always less or equal to the period_us, as it denotes the time allocated from the period_us for the real-time tasks. Without CONFIG_RT_GROUP_SCHED enabled, this only serves for admission control of deadline tasks. With CONFIG_RT_GROUP_SCHED=y it also signifies the total bandwidth available to all real-time groups.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K]hj~ubj )”}”(hhh]”(j)”}”(hŒqTime is specified in us because the interface is s32. This gives an operating range from 1us to about 35 minutes.”h]”há)”}”(hŒqTime is specified in us because the interface is s32. This gives an operating range from 1us to about 35 minutes.”h]”hŒqTime is specified in us because the interface is s32. This gives an operating range from 1us to about 35 minutes.”…””}”(hj–hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h Kdhj’ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj)”}”(hŒ2sched_rt_period_us takes values from 1 to INT_MAX.”h]”há)”}”(hj¬h]”hŒ2sched_rt_period_us takes values from 1 to INT_MAX.”…””}”(hj®hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h Kfhjªubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj)”}”(hŒ?sched_rt_runtime_us takes values from -1 to sched_rt_period_us.”h]”há)”}”(hjÃh]”hŒ?sched_rt_runtime_us takes values from -1 to sched_rt_period_us.”…””}”(hjÅhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h KghjÁubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj)”}”(hŒ;A run time of -1 specifies runtime == period, ie. no limit.”h]”há)”}”(hjÚh]”hŒ;A run time of -1 specifies runtime == period, ie. no limit.”…””}”(hjÜhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h KhhjØubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubj)”}”(hŒÁsched_rt_runtime_us/sched_rt_period_us > 0.05 inorder to preserve bandwidth for fair dl_server. For accurate value check average of runtime/period in /sys/kernel/debug/sched/fair_server/cpuX/ ”h]”há)”}”(hŒ¿sched_rt_runtime_us/sched_rt_period_us > 0.05 inorder to preserve bandwidth for fair dl_server. For accurate value check average of runtime/period in /sys/kernel/debug/sched/fair_server/cpuX/”h]”hŒ¿sched_rt_runtime_us/sched_rt_period_us > 0.05 inorder to preserve bandwidth for fair dl_server. For accurate value check average of runtime/period in /sys/kernel/debug/sched/fair_server/cpuX/”…””}”(hjóhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h Kihjïubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubeh}”(h]”h ]”h"]”h$]”h&]”jEjFuh1jhŸh¶h Kdhj~ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jMhjlubeh}”(h]”h ]”h"]”h$]”h&]”uh1j7hŸh¶h Klhj4hžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2hjhžhhŸh¶h Nubeh}”(h]”Œsystem-wide-settings”ah ]”h"]”Œ2.1 system wide settings”ah$]”h&]”uh1h¡hjhžhhŸh¶h KUubh¢)”}”(hhh]”(h§)”}”(hŒ2.2 Default behaviour”h]”hŒ2.2 Default behaviour”…””}”(hj*hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj'hžhhŸh¶h Koubhá)”}”(hX^The default values for sched_rt_period_us (1000000 or 1s) and sched_rt_runtime_us (950000 or 0.95s). This gives 0.05s to be used by SCHED_OTHER (non-RT tasks). These defaults were chosen so that a run-away real-time tasks will not lock up the machine but leave a little time to recover it. By setting runtime to -1 you'd get the old behaviour back.”h]”hX`The default values for sched_rt_period_us (1000000 or 1s) and sched_rt_runtime_us (950000 or 0.95s). This gives 0.05s to be used by SCHED_OTHER (non-RT tasks). These defaults were chosen so that a run-away real-time tasks will not lock up the machine but leave a little time to recover it. By setting runtime to -1 you’d get the old behaviour back.”…””}”(hj8hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h Kqhj'hžhubhá)”}”(hX!By default all bandwidth is assigned to the root group and new groups get the period from /proc/sys/kernel/sched_rt_period_us and a run time of 0. If you want to assign bandwidth to another group, reduce the root group's bandwidth and assign some or all of the difference to another group.”h]”hX#By default all bandwidth is assigned to the root group and new groups get the period from /proc/sys/kernel/sched_rt_period_us and a run time of 0. If you want to assign bandwidth to another group, reduce the root group’s bandwidth and assign some or all of the difference to another group.”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h Kwhj'hžhubhá)”}”(hX>Real-time group scheduling means you have to assign a portion of total CPU bandwidth to the group before it will accept real-time tasks. Therefore you will not be able to run real-time tasks as any user other than root until you have done that, even if the user has the rights to run processes with real-time priority!”h]”hX>Real-time group scheduling means you have to assign a portion of total CPU bandwidth to the group before it will accept real-time tasks. Therefore you will not be able to run real-time tasks as any user other than root until you have done that, even if the user has the rights to run processes with real-time priority!”…””}”(hjThžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K|hj'hžhubeh}”(h]”Œdefault-behaviour”ah ]”h"]”Œ2.2 default behaviour”ah$]”h&]”uh1h¡hjhžhhŸh¶h Koubh¢)”}”(hhh]”(h§)”}”(hŒ2.3 Basis for grouping tasks”h]”hŒ2.3 Basis for grouping tasks”…””}”(hjmhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjjhžhhŸh¶h K„ubhá)”}”(hŒ^Enabling CONFIG_RT_GROUP_SCHED lets you explicitly allocate real CPU bandwidth to task groups.”h]”hŒ^Enabling CONFIG_RT_GROUP_SCHED lets you explicitly allocate real CPU bandwidth to task groups.”…””}”(hj{hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K†hjjhžhubhá)”}”(hŒ‚This uses the cgroup virtual file system and "/cpu.rt_runtime_us" to control the CPU time reserved for each control group.”h]”hŒ†This uses the cgroup virtual file system and “/cpu.rt_runtime_us†to control the CPU time reserved for each control group.”…””}”(hj‰hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K‰hjjhžhubhá)”}”(hŒ}For more information on working with control groups, you should read Documentation/admin-guide/cgroup-v1/cgroups.rst as well.”h]”hŒ}For more information on working with control groups, you should read Documentation/admin-guide/cgroup-v1/cgroups.rst as well.”…””}”(hj—hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h KŒhjjhžhubhá)”}”(hŒgGroup settings are checked against the following limits in order to keep the configuration schedulable:”h]”hŒgGroup settings are checked against the following limits in order to keep the configuration schedulable:”…””}”(hj¥hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h KhjjhžhubhÛ)”}”(hŒG\Sum_{i} runtime_{i} / global_period <= global_runtime / global_period ”h]”há)”}”(hŒF\Sum_{i} runtime_{i} / global_period <= global_runtime / global_period”h]”hŒFSum_{i} runtime_{i} / global_period <= global_runtime / global_period”…””}”(hj·hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K’hj³ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh¶h K’hjjhžhubhá)”}”(hŒMFor now, this can be simplified to just the following (but see Future plans):”h]”hŒMFor now, this can be simplified to just the following (but see Future plans):”…””}”(hjËhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K”hjjhžhubhÛ)”}”(hŒ(\Sum_{i} runtime_{i} <= global_runtime ”h]”há)”}”(hŒ&\Sum_{i} runtime_{i} <= global_runtime”h]”hŒ&Sum_{i} runtime_{i} <= global_runtime”…””}”(hjÝhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K–hjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh¶h K–hjjhžhubeh}”(h]”Œbasis-for-grouping-tasks”ah ]”h"]”Œ2.3 basis for grouping tasks”ah$]”h&]”uh1h¡hjhžhhŸh¶h K„ubeh}”(h]”Œ the-interface”ah ]”h"]”Œ2. the interface”ah$]”h&]”uh1h¡hh£hžhhŸh¶h KQubh¢)”}”(hhh]”(h§)”}”(hŒ3. Future plans”h]”hŒ3. Future plans”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h Kšubhá)”}”(hŒzThere is work in progress to make the scheduling period for each group ("/cpu.rt_period_us") configurable as well.”h]”hŒ~There is work in progress to make the scheduling period for each group (“/cpu.rt_period_usâ€) configurable as well.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h Kœhjhžhubhá)”}”(hŒÆThe constraint on the period is that a subgroup must have a smaller or equal period to its parent. But realistically its not very useful _yet_ as its prone to starvation without deadline scheduling.”h]”hŒÆThe constraint on the period is that a subgroup must have a smaller or equal period to its parent. But realistically its not very useful _yet_ as its prone to starvation without deadline scheduling.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h KŸhjhžhubhá)”}”(hŒhConsider two sibling groups A and B; both have 50% bandwidth, but A's period is twice the length of B's.”h]”hŒlConsider two sibling groups A and B; both have 50% bandwidth, but A’s period is twice the length of B’s.”…””}”(hj.hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K£hjhžhubj )”}”(hhh]”(j)”}”(hŒWgroup A: period=100000us, runtime=50000us - this runs for 0.05s once every 0.1s ”h]”(há)”}”(hŒ)group A: period=100000us, runtime=50000us”h]”hŒ)group A: period=100000us, runtime=50000us”…””}”(hjChžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K¦hj?ubhÛ)”}”(hŒ&- this runs for 0.05s once every 0.1s ”h]”j )”}”(hhh]”j)”}”(hŒ$this runs for 0.05s once every 0.1s ”h]”há)”}”(hŒ#this runs for 0.05s once every 0.1s”h]”hŒ#this runs for 0.05s once every 0.1s”…””}”(hj\hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K¨hjXubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjUubah}”(h]”h ]”h"]”h$]”h&]”jEŒ-”uh1jhŸh¶h K¨hjQubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh¶h K¨hj?ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hj<hžhhŸh¶h Nubj)”}”(hŒsgroup B: period= 50000us, runtime=25000us - this runs for 0.025s twice every 0.1s (or once every 0.05 sec). ”h]”(há)”}”(hŒ)group B: period= 50000us, runtime=25000us”h]”hŒ)group B: period= 50000us, runtime=25000us”…””}”(hj‡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h KªhjƒubhÛ)”}”(hŒB- this runs for 0.025s twice every 0.1s (or once every 0.05 sec). ”h]”j )”}”(hhh]”j)”}”(hŒ@this runs for 0.025s twice every 0.1s (or once every 0.05 sec). ”h]”há)”}”(hŒ?this runs for 0.025s twice every 0.1s (or once every 0.05 sec).”h]”hŒ?this runs for 0.025s twice every 0.1s (or once every 0.05 sec).”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K¬hjœubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj™ubah}”(h]”h ]”h"]”h$]”h&]”jEjvuh1jhŸh¶h K¬hj•ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh¶h K¬hjƒubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hj<hžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”jEjFuh1jhŸh¶h K¦hjhžhubhá)”}”(hŒ¤This means that currently a while (1) loop in A will run for the full period of B and can starve B's tasks (assuming they are of lower priority) for a whole period.”h]”hŒ¦This means that currently a while (1) loop in A will run for the full period of B and can starve B’s tasks (assuming they are of lower priority) for a whole period.”…””}”(hjÌhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K®hjhžhubhá)”}”(hXThe next project will be SCHED_EDF (Earliest Deadline First scheduling) to bring full deadline scheduling to the linux kernel. Deadline scheduling the above groups and treating end of the period as a deadline will ensure that they both get their allocated time.”h]”hXThe next project will be SCHED_EDF (Earliest Deadline First scheduling) to bring full deadline scheduling to the linux kernel. Deadline scheduling the above groups and treating end of the period as a deadline will ensure that they both get their allocated time.”…””}”(hjÚhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K²hjhžhubhá)”}”(hXVImplementing SCHED_EDF might take a while to complete. Priority Inheritance is the biggest challenge as the current linux PI infrastructure is geared towards the limited static priority levels 0-99. With deadline scheduling you need to do deadline inheritance (since priority is inversely proportional to the deadline delta (deadline - now)).”h]”hXVImplementing SCHED_EDF might take a while to complete. Priority Inheritance is the biggest challenge as the current linux PI infrastructure is geared towards the limited static priority levels 0-99. With deadline scheduling you need to do deadline inheritance (since priority is inversely proportional to the deadline delta (deadline - now)).”…””}”(hjèhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K·hjhžhubhá)”}”(hŒxThis means the whole PI machinery will have to be reworked - and that is one of the most complex pieces of code we have.”h]”hŒxThis means the whole PI machinery will have to be reworked - and that is one of the most complex pieces of code we have.”…””}”(hjöhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hàhŸh¶h K½hjhžhubeh}”(h]”Œ future-plans”ah ]”h"]”Œ3. future plans”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kšubeh}”(h]”Œreal-time-group-scheduling”ah ]”h"]”Œreal-time group scheduling”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j7Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjjRjOjÿjüjŠj‡j÷jôjþjûj$j!jgjdjöjój juŒ nametypes”}”(j‰jR‰jÿ‰jЉj÷‰jþ‰j$‰jg‰jö‰j ‰uh}”(jh£jOhÉjüjUj‡jfjôjjûjj!jjdj'jójjjjuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.