€•Á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/trace/rv/monitor_sched”Œ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/trace/rv/monitor_sched”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/trace/rv/monitor_sched”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/trace/rv/monitor_sched”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/trace/rv/monitor_sched”Œ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/trace/rv/monitor_sched”Œ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ŒScheduler monitors”h]”hŒScheduler monitors”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒD/var/lib/git/docbuild/linux/Documentation/trace/rv/monitor_sched.rst”h KubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ Name: sched”h]”hŒ paragraph”“”)”}”(hhÀh]”hŒ Name: sched”…””}”(hhÄhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khh¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hh¹hžhhŸh¶h Nubh½)”}”(hŒ%Type: container for multiple monitors”h]”hÃ)”}”(hhÙh]”hŒ%Type: container for multiple monitors”…””}”(hhÛhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khh×ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hh¹hžhhŸh¶h Nubh½)”}”(hŒ^Author: Gabriele Monaco , Daniel Bristot de Oliveira ”h]”hÃ)”}”(hŒ]Author: Gabriele Monaco , Daniel Bristot de Oliveira ”h]”(hŒAuthor: Gabriele Monaco <”…””}”(hhòhžhhŸNh NubhŒ reference”“”)”}”(hŒgmonaco@redhat.com”h]”hŒgmonaco@redhat.com”…””}”(hhühžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:gmonaco@redhat.com”uh1húhhòubhŒ>, Daniel Bristot de Oliveira <”…””}”(hhòhžhhŸNh Nubhû)”}”(hŒbristot@kernel.org”h]”hŒbristot@kernel.org”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:bristot@kernel.org”uh1húhhòubhŒ>”…””}”(hhòhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khhîubah}”(h]”h ]”h"]”h$]”h&]”uh1h¼hh¹hžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1h·hŸh¶h Khh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒ Description”h]”hŒ Description”…””}”(hj;hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj8hžhhŸh¶h K ubhÃ)”}”(hXMonitors describing complex systems, such as the scheduler, can easily grow to the point where they are just hard to understand because of the many possible state transitions. Often it is possible to break such descriptions into smaller monitors, sharing some or all events. Enabling those smaller monitors concurrently is, in fact, testing the system as if we had one single larger monitor. Splitting models into multiple specification is not only easier to understand, but gives some more clues when we see errors.”h]”hXMonitors describing complex systems, such as the scheduler, can easily grow to the point where they are just hard to understand because of the many possible state transitions. Often it is possible to break such descriptions into smaller monitors, sharing some or all events. Enabling those smaller monitors concurrently is, in fact, testing the system as if we had one single larger monitor. Splitting models into multiple specification is not only easier to understand, but gives some more clues when we see errors.”…””}”(hjIhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K hj8hžhubhÃ)”}”(hŒÛThe sched monitor is a set of specifications to describe the scheduler behaviour. It includes several per-cpu and per-task monitors that work independently to verify different specifications the scheduler should follow.”h]”hŒÛThe sched monitor is a set of specifications to describe the scheduler behaviour. It includes several per-cpu and per-task monitors that work independently to verify different specifications the scheduler should follow.”…””}”(hjWhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj8hžhubhÃ)”}”(hXkTo make this system as straightforward as possible, sched specifications are *nested* monitors, whereas sched itself is a *container*. From the interface perspective, sched includes other monitors as sub-directories, enabling/disabling or setting reactors to sched, propagates the change to all monitors, however single monitors can be used independently as well.”h]”(hŒMTo make this system as straightforward as possible, sched specifications are ”…””}”(hjehžhhŸNh NubhŒemphasis”“”)”}”(hŒ*nested*”h]”hŒnested”…””}”(hjohžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jmhjeubhŒ% monitors, whereas sched itself is a ”…””}”(hjehžhhŸNh Nubjn)”}”(hŒ *container*”h]”hŒ container”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jmhjeubhŒæ. From the interface perspective, sched includes other monitors as sub-directories, enabling/disabling or setting reactors to sched, propagates the change to all monitors, however single monitors can be used independently as well.”…””}”(hjehžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj8hžhubhÃ)”}”(hŒíIt is important that future modules are built after their container (sched, in this case), otherwise the linker would not respect the order and the nesting wouldn't work as expected. To do so, simply add them after sched in the Makefile.”h]”hŒïIt is important that future modules are built after their container (sched, in this case), otherwise the linker would not respect the order and the nesting wouldn’t work as expected. To do so, simply add them after sched in the Makefile.”…””}”(hj™hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Khj8hžhubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K ubh¢)”}”(hhh]”(h§)”}”(hŒSpecifications”h]”hŒSpecifications”…””}”(hj²hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj¯hžhhŸh¶h K$ubhÃ)”}”(hŒ}The specifications included in sched are currently a work in progress, adapting the ones defined in by Daniel Bristot in [1].”h]”hŒ}The specifications included in sched are currently a work in progress, adapting the ones defined in by Daniel Bristot in [1].”…””}”(hjÀhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K&hj¯hžhubhÃ)”}”(hŒ$Currently we included the following:”h]”hŒ$Currently we included the following:”…””}”(hjÎhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K)hj¯hžhubh¢)”}”(hhh]”(h§)”}”(hŒ Monitor tss”h]”hŒ Monitor tss”…””}”(hjßhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÜhžhhŸh¶h K,ubhÃ)”}”(hŒThe task switch while scheduling (tss) monitor ensures a task switch happens only in scheduling context, that is inside a call to `__schedule`::”h]”(hŒ‚The task switch while scheduling (tss) monitor ensures a task switch happens only in scheduling context, that is inside a call to ”…””}”(hjíhžhhŸNh NubhŒtitle_reference”“”)”}”(hŒ `__schedule`”h]”hŒ __schedule”…””}”(hj÷hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jõhjíubhŒ:”…””}”(hjíhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K.hjÜhžhubhŒ literal_block”“”)”}”(hXÙ | | v +-----------------+ | thread | <+ +-----------------+ | | | | schedule_entry | schedule_exit v | sched_switch | +--------------- | | sched | +--------------> -+”h]”hXÙ | | v +-----------------+ | thread | <+ +-----------------+ | | | | schedule_entry | schedule_exit v | sched_switch | +--------------- | | sched | +--------------> -+”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jhŸh¶h K1hjÜhžhubeh}”(h]”Œ monitor-tss”ah ]”h"]”Œ monitor tss”ah$]”h&]”uh1h¡hj¯hžhhŸh¶h K,ubh¢)”}”(hhh]”(h§)”}”(hŒ Monitor sco”h]”hŒ Monitor sco”…””}”(hj,hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj)hžhhŸh¶h K@ubhÃ)”}”(hŒoThe scheduling context operations (sco) monitor ensures changes in a task state happen only in thread context::”h]”hŒnThe scheduling context operations (sco) monitor ensures changes in a task state happen only in thread context:”…””}”(hj:hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KBhj)hžhubj)”}”(hX | | v sched_set_state +------------------+ +------------------ | | | | thread_context | +-----------------> | | <+ +------------------+ | | | | schedule_entry | schedule_exit v | | scheduling_context -+”h]”hX | | v sched_set_state +------------------+ +------------------ | | | | thread_context | +-----------------> | | <+ +------------------+ | | | | schedule_entry | schedule_exit v | | scheduling_context -+”…””}”hjHsbah}”(h]”h ]”h"]”h$]”h&]”jj uh1jhŸh¶h KFhj)hžhubeh}”(h]”Œ monitor-sco”ah ]”h"]”Œ monitor sco”ah$]”h&]”uh1h¡hj¯hžhhŸh¶h K@ubh¢)”}”(hhh]”(h§)”}”(hŒ Monitor snroc”h]”hŒ Monitor snroc”…””}”(hjahžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj^hžhhŸh¶h KUubhÃ)”}”(hŒ£The set non runnable on its own context (snroc) monitor ensures changes in a task state happens only in the respective task's context. This is a per-task monitor::”h]”hŒ¤The set non runnable on its own context (snroc) monitor ensures changes in a task state happens only in the respective task’s context. This is a per-task monitor:”…””}”(hjohžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KWhj^hžhubj)”}”(hX  | | v +------------------+ | other_context | <+ +------------------+ | | | | sched_switch_in | sched_switch_out v | sched_set_state | +------------------ | | own_context | +-----------------> -+”h]”hX  | | v +------------------+ | other_context | <+ +------------------+ | | | | sched_switch_in | sched_switch_out v | sched_set_state | +------------------ | | own_context | +-----------------> -+”…””}”hj}sbah}”(h]”h ]”h"]”h$]”h&]”jj uh1jhŸh¶h K[hj^hžhubeh}”(h]”Œ monitor-snroc”ah ]”h"]”Œ monitor snroc”ah$]”h&]”uh1h¡hj¯hžhhŸh¶h KUubh¢)”}”(hhh]”(h§)”}”(hŒ Monitor scpd”h]”hŒ Monitor scpd”…””}”(hj–hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj“hžhhŸh¶h KjubhÃ)”}”(hŒqThe schedule called with preemption disabled (scpd) monitor ensures schedule is called with preemption disabled::”h]”hŒpThe schedule called with preemption disabled (scpd) monitor ensures schedule is called with preemption disabled:”…””}”(hj¤hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h Klhj“hžhubj)”}”(hX) | | v +------------------+ | cant_sched | <+ +------------------+ | | | | preempt_disable | preempt_enable v | schedule_entry | schedule_exit | +----------------- can_sched | | | +----------------> -+”h]”hX) | | v +------------------+ | cant_sched | <+ +------------------+ | | | | preempt_disable | preempt_enable v | schedule_entry | schedule_exit | +----------------- can_sched | | | +----------------> -+”…””}”hj²sbah}”(h]”h ]”h"]”h$]”h&]”jj uh1jhŸh¶h Kohj“hžhubeh}”(h]”Œ monitor-scpd”ah ]”h"]”Œ monitor scpd”ah$]”h&]”uh1h¡hj¯hžhhŸh¶h Kjubh¢)”}”(hhh]”(h§)”}”(hŒ Monitor snep”h]”hŒ Monitor snep”…””}”(hjËhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÈhžhhŸh¶h KubhÃ)”}”(hŒhThe schedule does not enable preempt (snep) monitor ensures a schedule call does not enable preemption::”h]”hŒgThe schedule does not enable preempt (snep) monitor ensures a schedule call does not enable preemption:”…””}”(hjÙhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h KhjÈhžhubj)”}”(hXo | | v preempt_disable +------------------------+ preempt_enable | | +------------------ | non_scheduling_context | | | | +-----------------> | | <+ +------------------------+ | | | | schedule_entry | schedule_exit v | | scheduling_contex -+”h]”hXo | | v preempt_disable +------------------------+ preempt_enable | | +------------------ | non_scheduling_context | | | | +-----------------> | | <+ +------------------------+ | | | | schedule_entry | schedule_exit v | | scheduling_contex -+”…””}”hjçsbah}”(h]”h ]”h"]”h$]”h&]”jj uh1jhŸh¶h K„hjÈhžhubeh}”(h]”Œ monitor-snep”ah ]”h"]”Œ monitor snep”ah$]”h&]”uh1h¡hj¯hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ Monitor sncid”h]”hŒ Monitor sncid”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjýhžhhŸh¶h K”ubhÃ)”}”(hŒxThe schedule not called with interrupt disabled (sncid) monitor ensures schedule is not called with interrupt disabled::”h]”hŒwThe schedule not called with interrupt disabled (sncid) monitor ensures schedule is not called with interrupt disabled:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K–hjýhžhubj)”}”(hXð | | v schedule_entry +--------------+ schedule_exit | | +----------------- | can_sched | | | | +----------------> | | <+ +--------------+ | | | | irq_disable | irq_enable v | | cant_sched -+”h]”hXð | | v schedule_entry +--------------+ schedule_exit | | +----------------- | can_sched | | | | +----------------> | | <+ +--------------+ | | | | irq_disable | irq_enable v | | cant_sched -+”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jj uh1jhŸh¶h K™hjýhžhubeh}”(h]”Œ monitor-sncid”ah ]”h"]”Œ monitor sncid”ah$]”h&]”uh1h¡hj¯hžhhŸh¶h K”ubeh}”(h]”Œspecifications”ah ]”h"]”Œspecifications”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K$ubh¢)”}”(hhh]”(h§)”}”(hŒ References”h]”hŒ References”…””}”(hj=hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj:hžhhŸh¶h K©ubhÃ)”}”(hŒ)[1] - https://bristot.me/linux-task-model”h]”(hŒ[1] - ”…””}”(hjKhžhhŸNh Nubhû)”}”(hŒ#https://bristot.me/linux-task-model”h]”hŒ#https://bristot.me/linux-task-model”…””}”(hjShžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jUuh1húhjKubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÂhŸh¶h K«hj:hžhubeh}”(h]”Œ references”ah ]”h"]”Œ references”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K©ubeh}”(h]”Œscheduler-monitors”ah ]”h"]”Œscheduler monitors”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”j›Œ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”}”(jujrj¬j©j7j4j&j#j[jXjjjÅjÂjúj÷j/j,jmjjuŒ nametypes”}”(ju‰j¬‰j7‰j&‰j[‰j‰jʼnjú‰j/‰jm‰uh}”(jrh£j©j8j4j¯j#jÜjXj)jj^jÂj“j÷jÈj,jýjjj:uŒ 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.