€•Œ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”Œ6/translations/zh_CN/arch/arm/cluster-pm-race-avoidance”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/zh_TW/arch/arm/cluster-pm-race-avoidance”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/it_IT/arch/arm/cluster-pm-race-avoidance”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/ja_JP/arch/arm/cluster-pm-race-avoidance”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/ko_KR/arch/arm/cluster-pm-race-avoidance”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/pt_BR/arch/arm/cluster-pm-race-avoidance”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/sp_SP/arch/arm/cluster-pm-race-avoidance”Œ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Œ9Cluster-wide Power-up/power-down race avoidance algorithm”h]”hŒ9Cluster-wide Power-up/power-down race avoidance algorithm”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒP/var/lib/git/docbuild/linux/Documentation/arch/arm/cluster-pm-race-avoidance.rst”h´KubhŒ paragraph”“”)�”}”(hŒ�This file documents the algorithm which is used to coordinate CPU and cluster setup and teardown operations and to manage hardware coherency controls safely.”h]”hŒ�This file documents the algorithm which is used to coordinate CPU and cluster setup and teardown operations and to manage hardware coherency controls safely.”…”�”}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hŒèThe section "Rationale" explains what the algorithm is for and why it is needed. "Basic model" explains general concepts using a simplified view of the system. The other sections explain the actual details of the algorithm in use.”h]”hŒðThe section “Rationaleâ€� explains what the algorithm is for and why it is needed. “Basic modelâ€� explains general concepts using a simplified view of the system. The other sections explain the actual details of the algorithm in use.”…”�”}”(hhÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hh·h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ Rationale”h]”hŒ Rationale”…”�”}”(hhìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhéh²hh³hÊh´KubhÌ)�”}”(hŒ²In a system containing multiple CPUs, it is desirable to have the ability to turn off individual CPUs when the system is idle, reducing power consumption and thermal dissipation.”h]”hŒ²In a system containing multiple CPUs, it is desirable to have the ability to turn off individual CPUs when the system is idle, reducing power consumption and thermal dissipation.”…”�”}”(hhúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhéh²hubhÌ)�”}”(hŒwIn a system containing multiple clusters of CPUs, it is also desirable to have the ability to turn off entire clusters.”h]”hŒwIn a system containing multiple clusters of CPUs, it is also desirable to have the ability to turn off entire clusters.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhéh²hubhÌ)�”}”(hXaTurning entire clusters off and on is a risky business, because it involves performing potentially destructive operations affecting a group of independently running CPUs, while the OS continues to run. This means that we need some coordination in order to ensure that critical cluster-level operations are only performed when it is truly safe to do so.”h]”hXaTurning entire clusters off and on is a risky business, because it involves performing potentially destructive operations affecting a group of independently running CPUs, while the OS continues to run. This means that we need some coordination in order to ensure that critical cluster-level operations are only performed when it is truly safe to do so.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhéh²hubhÌ)�”}”(hXÐSimple locking may not be sufficient to solve this problem, because mechanisms like Linux spinlocks may rely on coherency mechanisms which are not immediately enabled when a cluster powers up. Since enabling or disabling those mechanisms may itself be a non-atomic operation (such as writing some hardware registers and invalidating large caches), other methods of coordination are required in order to guarantee safe power-down and power-up at the cluster level.”h]”hXÐSimple locking may not be sufficient to solve this problem, because mechanisms like Linux spinlocks may rely on coherency mechanisms which are not immediately enabled when a cluster powers up. Since enabling or disabling those mechanisms may itself be a non-atomic operation (such as writing some hardware registers and invalidating large caches), other methods of coordination are required in order to guarantee safe power-down and power-up at the cluster level.”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hhéh²hubhÌ)�”}”(hŒÖThe mechanism presented in this document describes a coherent memory based protocol for performing the needed coordination. It aims to be as lightweight as possible, while providing the required safety properties.”h]”hŒÖThe mechanism presented in this document describes a coherent memory based protocol for performing the needed coordination. It aims to be as lightweight as possible, while providing the required safety properties.”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K(hhéh²hubeh}”(h]”Œ rationale”ah ]”h"]”Œ rationale”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ Basic model”h]”hŒ Basic model”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjHh²hh³hÊh´K.ubhÌ)�”}”(hŒ5Each cluster and CPU is assigned a state, as follows:”h]”hŒ5Each cluster and CPU is assigned a state, as follows:”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K0hjHh²hubhŒ block_quote”“”)�”}”(hŒ%- DOWN - COMING_UP - UP - GOING_DOWN ”h]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒDOWN”h]”hÌ)�”}”(hjvh]”hŒDOWN”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K2hjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjoubjs)�”}”(hŒ COMING_UP”h]”hÌ)�”}”(hj�h]”hŒ COMING_UP”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K3hj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjoubjs)�”}”(hŒUP”h]”hÌ)�”}”(hj¤h]”hŒUP”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K4hj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjoubjs)�”}”(hŒ GOING_DOWN ”h]”hÌ)�”}”(hŒ GOING_DOWN”h]”hŒ GOING_DOWN”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K5hj¹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjoubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jmh³hÊh´K2hjiubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´K2hjHh²hubhŒ literal_block”“”)�”}”(hŒ¡ +---------> UP ----------+ | v COMING_UP GOING_DOWN ^ | +--------- DOWN <--------+”h]”hŒ¡ +---------> UP ----------+ | v COMING_UP GOING_DOWN ^ | +--------- DOWN <--------+”…”�”}”hjásbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jßh³hÊh´K9hjHh²hubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒ~DOWN: The CPU or cluster is not coherent, and is either powered off or suspended, or is ready to be powered off or suspended. ”h]”(hŒterm”“”)�”}”(hŒDOWN:”h]”hŒDOWN:”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KDhjøubhŒ definition”“”)�”}”(hhh]”hÌ)�”}”(hŒwThe CPU or cluster is not coherent, and is either powered off or suspended, or is ready to be powered off or suspended.”h]”hŒwThe CPU or cluster is not coherent, and is either powered off or suspended, or is ready to be powered off or suspended.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KChjubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjøubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KDhjóubj÷)�”}”(hŒ˜COMING_UP: The CPU or cluster has committed to moving to the UP state. It may be part way through the process of initialisation and enabling coherency. ”h]”(jý)�”}”(hŒ COMING_UP:”h]”hŒ COMING_UP:”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KIhj+ubj )�”}”(hhh]”hÌ)�”}”(hŒŒThe CPU or cluster has committed to moving to the UP state. It may be part way through the process of initialisation and enabling coherency.”h]”hŒŒThe CPU or cluster has committed to moving to the UP state. It may be part way through the process of initialisation and enabling coherency.”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KGhj=ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj+ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KIhjóh²hubj÷)�”}”(hŒ�UP: The CPU or cluster is active and coherent at the hardware level. A CPU in this state is not necessarily being used actively by the kernel. ”h]”(jý)�”}”(hŒUP:”h]”hŒUP:”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KNhjZubj )�”}”(hhh]”hÌ)�”}”(hŒ‹The CPU or cluster is active and coherent at the hardware level. A CPU in this state is not necessarily being used actively by the kernel.”h]”hŒ‹The CPU or cluster is active and coherent at the hardware level. A CPU in this state is not necessarily being used actively by the kernel.”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KLhjlubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjZubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KNhjóh²hubj÷)�”}”(hŒ“GOING_DOWN: The CPU or cluster has committed to moving to the DOWN state. It may be part way through the process of teardown and coherency exit. ”h]”(jý)�”}”(hŒ GOING_DOWN:”h]”hŒ GOING_DOWN:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KThj‰ubj )�”}”(hhh]”hÌ)�”}”(hŒ…The CPU or cluster has committed to moving to the DOWN state. It may be part way through the process of teardown and coherency exit.”h]”hŒ…The CPU or cluster has committed to moving to the DOWN state. It may be part way through the process of teardown and coherency exit.”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KQhj›ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj‰ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KThjóh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjHh²hh³hÊh´NubhÌ)�”}”(hŒ…Each CPU has one of these states assigned to it at any point in time. The CPU states are described in the "CPU state" section, below.”h]”hŒ‰Each CPU has one of these states assigned to it at any point in time. The CPU states are described in the “CPU stateâ€� section, below.”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KVhjHh²hubhÌ)�”}”(hXZEach cluster is also assigned a state, but it is necessary to split the state value into two parts (the "cluster" state and "inbound" state) and to introduce additional states in order to avoid races between different CPUs in the cluster simultaneously modifying the state. The cluster- level states are described in the "Cluster state" section.”h]”hXfEach cluster is also assigned a state, but it is necessary to split the state value into two parts (the “clusterâ€� state and “inboundâ€� state) and to introduce additional states in order to avoid races between different CPUs in the cluster simultaneously modifying the state. The cluster- level states are described in the “Cluster stateâ€� section.”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KYhjHh²hubhÌ)�”}”(hŒÆTo help distinguish the CPU states from cluster states in this discussion, the state names are given a `CPU_` prefix for the CPU states, and a `CLUSTER_` or `INBOUND_` prefix for the cluster states.”h]”(hŒgTo help distinguish the CPU states from cluster states in this discussion, the state names are given a ”…”�”}”(hjÚh²hh³Nh´NubhŒtitle_reference”“”)�”}”(hŒ`CPU_`”h]”hŒCPU_”…”�”}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjÚubhŒ" prefix for the CPU states, and a ”…”�”}”(hjÚh²hh³Nh´Nubjã)�”}”(hŒ `CLUSTER_`”h]”hŒCLUSTER_”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjÚubhŒ or ”…”�”}”(hjÚh²hh³Nh´Nubjã)�”}”(hŒ `INBOUND_`”h]”hŒINBOUND_”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jâhjÚubhŒ prefix for the cluster states.”…”�”}”(hjÚh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K_hjHh²hubeh}”(h]”Œ basic-model”ah ]”h"]”Œ basic model”ah$]”h&]”uh1hµhh·h²hh³hÊh´K.ubh¶)�”}”(hhh]”(h»)�”}”(hŒ CPU state”h]”hŒ CPU state”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj(h²hh³hÊh´KeubhÌ)�”}”(hŒÍIn this algorithm, each individual core in a multi-core processor is referred to as a "CPU". CPUs are assumed to be single-threaded: therefore, a CPU can only be doing one thing at a single point in time.”h]”hŒÑIn this algorithm, each individual core in a multi-core processor is referred to as a “CPUâ€�. CPUs are assumed to be single-threaded: therefore, a CPU can only be doing one thing at a single point in time.”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kghj(h²hubhÌ)�”}”(hŒ1This means that CPUs fit the basic model closely.”h]”hŒ1This means that CPUs fit the basic model closely.”…”�”}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kkhj(h²hubhÌ)�”}”(hŒFThe algorithm defines the following states for each CPU in the system:”h]”hŒFThe algorithm defines the following states for each CPU in the system:”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kmhj(h²hubjh)�”}”(hŒ5- CPU_DOWN - CPU_COMING_UP - CPU_UP - CPU_GOING_DOWN ”h]”jn)�”}”(hhh]”(js)�”}”(hŒCPU_DOWN”h]”hÌ)�”}”(hjlh]”hŒCPU_DOWN”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kohjjubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjgubjs)�”}”(hŒ CPU_COMING_UP”h]”hÌ)�”}”(hjƒh]”hŒ CPU_COMING_UP”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kphj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjgubjs)�”}”(hŒCPU_UP”h]”hÌ)�”}”(hjšh]”hŒCPU_UP”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kqhj˜ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjgubjs)�”}”(hŒCPU_GOING_DOWN ”h]”hÌ)�”}”(hŒCPU_GOING_DOWN”h]”hŒCPU_GOING_DOWN”…”�”}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Krhj¯ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjgubeh}”(h]”h ]”h"]”h$]”h&]”j×jØuh1jmh³hÊh´Kohjcubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´Kohj(h²hubjà)�”}”(hXV cluster setup and CPU setup complete policy decision +-----------> CPU_UP ------------+ | v CPU_COMING_UP CPU_GOING_DOWN ^ | +----------- CPU_DOWN <----------+ policy decision CPU teardown complete or hardware event”h]”hXV cluster setup and CPU setup complete policy decision +-----------> CPU_UP ------------+ | v CPU_COMING_UP CPU_GOING_DOWN ^ | +----------- CPU_DOWN <----------+ policy decision CPU teardown complete or hardware event”…”�”}”hjÓsbah}”(h]”h ]”h"]”h$]”h&]”jïjðuh1jßh³hÊh´Kvhj(h²hubhÌ)�”}”(hŒWThe definitions of the four states correspond closely to the states of the basic model.”h]”hŒWThe definitions of the four states correspond closely to the states of the basic model.”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kƒhj(h²hubhÌ)�”}”(hŒ,Transitions between states occur as follows.”h]”hŒ,Transitions between states occur as follows.”…”�”}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K†hj(h²hubhÌ)�”}”(hŒ²A trigger event (spontaneous) means that the CPU can transition to the next state as a result of making local progress only, with no requirement for any external event to happen.”h]”hŒ²A trigger event (spontaneous) means that the CPU can transition to the next state as a result of making local progress only, with no requirement for any external event to happen.”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kˆhj(h²hubjò)�”}”(hhh]”(j÷)�”}”(hX½CPU_DOWN: A CPU reaches the CPU_DOWN state when it is ready for power-down. On reaching this state, the CPU will typically power itself down or suspend itself, via a WFI instruction or a firmware call. Next state: CPU_COMING_UP Conditions: none Trigger events: a) an explicit hardware power-up operation, resulting from a policy decision on another CPU; b) a hardware event, such as an interrupt. ”h]”(jý)�”}”(hŒ CPU_DOWN:”h]”hŒ CPU_DOWN:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´K�hjubj )�”}”(hhh]”(hÌ)�”}”(hŒÀA CPU reaches the CPU_DOWN state when it is ready for power-down. On reaching this state, the CPU will typically power itself down or suspend itself, via a WFI instruction or a firmware call.”h]”hŒÀA CPU reaches the CPU_DOWN state when it is ready for power-down. On reaching this state, the CPU will typically power itself down or suspend itself, via a WFI instruction or a firmware call.”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŽhj ubjò)�”}”(hhh]”(j÷)�”}”(hŒNext state: CPU_COMING_UP”h]”(jý)�”}”(hŒ Next state:”h]”hŒ Next state:”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´K“hj4ubj )�”}”(hhh]”hÌ)�”}”(hŒ CPU_COMING_UP”h]”hŒ CPU_COMING_UP”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K”hjFubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj4ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´K“hj1ubj÷)�”}”(hŒConditions: none ”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´K–hjcubj )�”}”(hhh]”hÌ)�”}”(hŒnone”h]”hŒnone”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K–hjuubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjcubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´K–hj1ubj÷)�”}”(hŒ�Trigger events: a) an explicit hardware power-up operation, resulting from a policy decision on another CPU; b) a hardware event, such as an interrupt. ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´K�hj’ubj )�”}”(hhh]”hŒenumerated_list”“”)�”}”(hhh]”(js)�”}”(hŒZan explicit hardware power-up operation, resulting from a policy decision on another CPU; ”h]”hÌ)�”}”(hŒYan explicit hardware power-up operation, resulting from a policy decision on another CPU;”h]”hŒYan explicit hardware power-up operation, resulting from a policy decision on another CPU;”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K™hj¬ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhj©ubjs)�”}”(hŒ)a hardware event, such as an interrupt. ”h]”hÌ)�”}”(hŒ'a hardware event, such as an interrupt.”h]”hŒ'a hardware event, such as an interrupt.”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KœhjÄubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhj©ubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œ loweralpha”Œprefix”hŒsuffix”Œ)”uh1j§hj¤ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj’ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´K�hj1ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´K�hj ubj÷)�”}”(hXÝCPU_COMING_UP: A CPU cannot start participating in hardware coherency until the cluster is set up and coherent. If the cluster is not ready, then the CPU will wait in the CPU_COMING_UP state until the cluster has been set up. Next state: CPU_UP Conditions: The CPU's parent cluster must be in CLUSTER_UP. Trigger events: Transition of the parent cluster to CLUSTER_UP. Refer to the "Cluster state" section for a description of the CLUSTER_UP state. ”h]”(jý)�”}”(hŒCPU_COMING_UP:”h]”hŒCPU_COMING_UP:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´K®hjubj )�”}”(hhh]”(hÌ)�”}”(hŒÓA CPU cannot start participating in hardware coherency until the cluster is set up and coherent. If the cluster is not ready, then the CPU will wait in the CPU_COMING_UP state until the cluster has been set up.”h]”hŒÓA CPU cannot start participating in hardware coherency until the cluster is set up and coherent. If the cluster is not ready, then the CPU will wait in the CPU_COMING_UP state until the cluster has been set up.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hjubjò)�”}”(hhh]”(j÷)�”}”(hŒNext state: CPU_UP”h]”(jý)�”}”(hŒ Next state:”h]”hŒ Next state:”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´K¥hj+ubj )�”}”(hhh]”hÌ)�”}”(hŒCPU_UP”h]”hŒCPU_UP”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¦hj=ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj+ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´K¥hj(ubj÷)�”}”(hŒ;Conditions: The CPU's parent cluster must be in CLUSTER_UP.”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´K§hjZubj )�”}”(hhh]”hÌ)�”}”(hŒ/The CPU's parent cluster must be in CLUSTER_UP.”h]”hŒ1The CPU’s parent cluster must be in CLUSTER_UP.”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¨hjlubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjZubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´K§hj(ubj÷)�”}”(hŒ@Trigger events: Transition of the parent cluster to CLUSTER_UP. ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´Kªhj‰ubj )�”}”(hhh]”hÌ)�”}”(hŒ/Transition of the parent cluster to CLUSTER_UP.”h]”hŒ/Transition of the parent cluster to CLUSTER_UP.”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kªhj›ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj‰ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´Kªhj(ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjubhÌ)�”}”(hŒORefer to the "Cluster state" section for a description of the CLUSTER_UP state.”h]”hŒSRefer to the “Cluster stateâ€� section for a description of the CLUSTER_UP state.”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¬hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´K®hj h²hubj÷)�”}”(hXÑCPU_UP: When a CPU reaches the CPU_UP state, it is safe for the CPU to start participating in local coherency. This is done by jumping to the kernel's CPU resume code. Note that the definition of this state is slightly different from the basic model definition: CPU_UP does not mean that the CPU is coherent yet, but it does mean that it is safe to resume the kernel. The kernel handles the rest of the resume procedure, so the remaining steps are not visible as part of the race avoidance algorithm. The CPU remains in this state until an explicit policy decision is made to shut down or suspend the CPU. Next state: CPU_GOING_DOWN Conditions: none Trigger events: explicit policy decision ”h]”(jý)�”}”(hŒCPU_UP:”h]”hŒCPU_UP:”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KÆhjØubj )�”}”(hhh]”(hÌ)�”}”(hŒfWhen a CPU reaches the CPU_UP state, it is safe for the CPU to start participating in local coherency.”h]”hŒfWhen a CPU reaches the CPU_UP state, it is safe for the CPU to start participating in local coherency.”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K±hjêubhÌ)�”}”(hŒ8This is done by jumping to the kernel's CPU resume code.”h]”hŒ:This is done by jumping to the kernel’s CPU resume code.”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K´hjêubhÌ)�”}”(hXMNote that the definition of this state is slightly different from the basic model definition: CPU_UP does not mean that the CPU is coherent yet, but it does mean that it is safe to resume the kernel. The kernel handles the rest of the resume procedure, so the remaining steps are not visible as part of the race avoidance algorithm.”h]”hXMNote that the definition of this state is slightly different from the basic model definition: CPU_UP does not mean that the CPU is coherent yet, but it does mean that it is safe to resume the kernel. The kernel handles the rest of the resume procedure, so the remaining steps are not visible as part of the race avoidance algorithm.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¶hjêubhÌ)�”}”(hŒhThe CPU remains in this state until an explicit policy decision is made to shut down or suspend the CPU.”h]”hŒhThe CPU remains in this state until an explicit policy decision is made to shut down or suspend the CPU.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K½hjêubjò)�”}”(hhh]”(j÷)�”}”(hŒNext state: CPU_GOING_DOWN”h]”(jý)�”}”(hŒ Next state:”h]”hŒ Next state:”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KÀhj(ubj )�”}”(hhh]”hÌ)�”}”(hŒCPU_GOING_DOWN”h]”hŒCPU_GOING_DOWN”…”�”}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÁhj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj(ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KÀhj%ubj÷)�”}”(hŒConditions: none”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hj[h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KÂhjWubj )�”}”(hhh]”hÌ)�”}”(hŒnone”h]”hŒnone”…”�”}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÃhjiubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjWubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KÂhj%ubj÷)�”}”(hŒ*Trigger events: explicit policy decision ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KÆhj†ubj )�”}”(hhh]”hÌ)�”}”(hŒexplicit policy decision”h]”hŒexplicit policy decision”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÅhj˜ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj†ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KÆhj%ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjêubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjØubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KÆhj h²hubj÷)�”}”(hXCPU_GOING_DOWN: While in this state, the CPU exits coherency, including any operations required to achieve this (such as cleaning data caches). Next state: CPU_DOWN Conditions: local CPU teardown complete Trigger events: (spontaneous) ”h]”(jý)�”}”(hŒCPU_GOING_DOWN:”h]”hŒCPU_GOING_DOWN:”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KÓhjÇubj )�”}”(hhh]”(hÌ)�”}”(hŒWhile in this state, the CPU exits coherency, including any operations required to achieve this (such as cleaning data caches).”h]”hŒWhile in this state, the CPU exits coherency, including any operations required to achieve this (such as cleaning data caches).”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÉhjÙubjò)�”}”(hhh]”(j÷)�”}”(hŒNext state: CPU_DOWN”h]”(jý)�”}”(hŒ Next state:”h]”hŒ Next state:”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KÍhjíubj )�”}”(hhh]”hÌ)�”}”(hŒCPU_DOWN”h]”hŒCPU_DOWN”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÎhjÿubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjíubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KÍhjêubj÷)�”}”(hŒ'Conditions: local CPU teardown complete”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KÏhjubj )�”}”(hhh]”hÌ)�”}”(hŒlocal CPU teardown complete”h]”hŒlocal CPU teardown complete”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÐhj.ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KÏhjêubj÷)�”}”(hŒTrigger events: (spontaneous) ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´KÓhjKubj )�”}”(hhh]”hÌ)�”}”(hŒ (spontaneous)”h]”hŒ (spontaneous)”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÒhj]ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjKubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KÓhjêubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjÙubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjÇubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´KÓhj h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhj(h²hh³Nh´Nubeh}”(h]”Œ cpu-state”ah ]”h"]”Œ cpu state”ah$]”h&]”uh1hµhh·h²hh³hÊh´Keubh¶)�”}”(hhh]”(h»)�”}”(hŒ Cluster state”h]”hŒ Cluster state”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjšh²hh³hÊh´KÖubhÌ)�”}”(hX A cluster is a group of connected CPUs with some common resources. Because a cluster contains multiple CPUs, it can be doing multiple things at the same time. This has some implications. In particular, a CPU can start up while another CPU is tearing the cluster down.”h]”hX A cluster is a group of connected CPUs with some common resources. Because a cluster contains multiple CPUs, it can be doing multiple things at the same time. This has some implications. In particular, a CPU can start up while another CPU is tearing the cluster down.”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KØhjšh²hubhÌ)�”}”(hŒÍIn this discussion, the "outbound side" is the view of the cluster state as seen by a CPU tearing the cluster down. The "inbound side" is the view of the cluster state as seen by a CPU setting the CPU up.”h]”hŒÕIn this discussion, the “outbound sideâ€� is the view of the cluster state as seen by a CPU tearing the cluster down. The “inbound sideâ€� is the view of the cluster state as seen by a CPU setting the CPU up.”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÝhjšh²hubhÌ)�”}”(hXIn order to enable safe coordination in such situations, it is important that a CPU which is setting up the cluster can advertise its state independently of the CPU which is tearing down the cluster. For this reason, the cluster state is split into two parts:”h]”hXIn order to enable safe coordination in such situations, it is important that a CPU which is setting up the cluster can advertise its state independently of the CPU which is tearing down the cluster. For this reason, the cluster state is split into two parts:”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Káhjšh²hubjh)�”}”(hX¡ "cluster" state: The global state of the cluster; or the state on the outbound side: - CLUSTER_DOWN - CLUSTER_UP - CLUSTER_GOING_DOWN "inbound" state: The state of the cluster on the inbound side. - INBOUND_NOT_COMING_UP - INBOUND_COMING_UP The different pairings of these states results in six possible states for the cluster as a whole:: CLUSTER_UP +==========> INBOUND_NOT_COMING_UP -------------+ # | | CLUSTER_UP <----+ | INBOUND_COMING_UP | v ^ CLUSTER_GOING_DOWN CLUSTER_GOING_DOWN # INBOUND_COMING_UP <=== INBOUND_NOT_COMING_UP CLUSTER_DOWN | | INBOUND_COMING_UP <----+ | | ^ | +=========== CLUSTER_DOWN <------------+ INBOUND_NOT_COMING_UP Transitions -----> can only be made by the outbound CPU, and only involve changes to the "cluster" state. Transitions ===##> can only be made by the inbound CPU, and only involve changes to the "inbound" state, except where there is no further transition possible on the outbound side (i.e., the outbound CPU has put the cluster into the CLUSTER_DOWN state). The race avoidance algorithm does not provide a way to determine which exact CPUs within the cluster play these roles. This must be decided in advance by some other means. Refer to the section "Last man and first man selection" for more explanation. CLUSTER_DOWN/INBOUND_NOT_COMING_UP is the only state where the cluster can actually be powered down. The parallelism of the inbound and outbound CPUs is observed by the existence of two different paths from CLUSTER_GOING_DOWN/ INBOUND_NOT_COMING_UP (corresponding to GOING_DOWN in the basic model) to CLUSTER_DOWN/INBOUND_COMING_UP (corresponding to COMING_UP in the basic model). The second path avoids cluster teardown completely. CLUSTER_UP/INBOUND_COMING_UP is equivalent to UP in the basic model. The final transition to CLUSTER_UP/INBOUND_NOT_COMING_UP is trivial and merely resets the state machine ready for the next cycle. Details of the allowable transitions follow. The next state in each case is notated / () where the is the side on which the transition can occur; either the inbound or the outbound side. ”h]”(hÌ)�”}”(hŒT"cluster" state: The global state of the cluster; or the state on the outbound side:”h]”hŒX“clusterâ€� state: The global state of the cluster; or the state on the outbound side:”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KæhjÕubjh)�”}”(hŒ1- CLUSTER_DOWN - CLUSTER_UP - CLUSTER_GOING_DOWN ”h]”jn)�”}”(hhh]”(js)�”}”(hŒ CLUSTER_DOWN”h]”hÌ)�”}”(hjðh]”hŒ CLUSTER_DOWN”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kéhjîubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjëubjs)�”}”(hŒ CLUSTER_UP”h]”hÌ)�”}”(hjh]”hŒ CLUSTER_UP”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kêhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjëubjs)�”}”(hŒCLUSTER_GOING_DOWN ”h]”hÌ)�”}”(hŒCLUSTER_GOING_DOWN”h]”hŒCLUSTER_GOING_DOWN”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Këhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjëubeh}”(h]”h ]”h"]”h$]”h&]”j×jØuh1jmh³hÊh´Kéhjçubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´KéhjÕubhÌ)�”}”(hŒ>"inbound" state: The state of the cluster on the inbound side.”h]”hŒB“inboundâ€� state: The state of the cluster on the inbound side.”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KíhjÕubjh)�”}”(hŒ-- INBOUND_NOT_COMING_UP - INBOUND_COMING_UP ”h]”jn)�”}”(hhh]”(js)�”}”(hŒINBOUND_NOT_COMING_UP”h]”hÌ)�”}”(hjWh]”hŒINBOUND_NOT_COMING_UP”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KïhjUubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjRubjs)�”}”(hŒINBOUND_COMING_UP ”h]”hÌ)�”}”(hŒINBOUND_COMING_UP”h]”hŒINBOUND_COMING_UP”…”�”}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kðhjlubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjRubeh}”(h]”h ]”h"]”h$]”h&]”j×jØuh1jmh³hÊh´KïhjNubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´KïhjÕubhÌ)�”}”(hŒbThe different pairings of these states results in six possible states for the cluster as a whole::”h]”hŒaThe different pairings of these states results in six possible states for the cluster as a whole:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KóhjÕubjà)�”}”(hX CLUSTER_UP +==========> INBOUND_NOT_COMING_UP -------------+ # | | CLUSTER_UP <----+ | INBOUND_COMING_UP | v ^ CLUSTER_GOING_DOWN CLUSTER_GOING_DOWN # INBOUND_COMING_UP <=== INBOUND_NOT_COMING_UP CLUSTER_DOWN | | INBOUND_COMING_UP <----+ | | ^ | +=========== CLUSTER_DOWN <------------+ INBOUND_NOT_COMING_UP”h]”hX CLUSTER_UP +==========> INBOUND_NOT_COMING_UP -------------+ # | | CLUSTER_UP <----+ | INBOUND_COMING_UP | v ^ CLUSTER_GOING_DOWN CLUSTER_GOING_DOWN # INBOUND_COMING_UP <=== INBOUND_NOT_COMING_UP CLUSTER_DOWN | | INBOUND_COMING_UP <----+ | | ^ | +=========== CLUSTER_DOWN <------------+ INBOUND_NOT_COMING_UP”…”�”}”hjžsbah}”(h]”h ]”h"]”h$]”h&]”jïjðuh1jßh³hÊh´KöhjÕubhÌ)�”}”(hŒiTransitions -----> can only be made by the outbound CPU, and only involve changes to the "cluster" state.”h]”hŒmTransitions -----> can only be made by the outbound CPU, and only involve changes to the “clusterâ€� state.”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÕubhÌ)�”}”(hŒüTransitions ===##> can only be made by the inbound CPU, and only involve changes to the "inbound" state, except where there is no further transition possible on the outbound side (i.e., the outbound CPU has put the cluster into the CLUSTER_DOWN state).”h]”hXTransitions ===##> can only be made by the inbound CPU, and only involve changes to the “inboundâ€� state, except where there is no further transition possible on the outbound side (i.e., the outbound CPU has put the cluster into the CLUSTER_DOWN state).”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hjÕubhÌ)�”}”(hŒûThe race avoidance algorithm does not provide a way to determine which exact CPUs within the cluster play these roles. This must be decided in advance by some other means. Refer to the section "Last man and first man selection" for more explanation.”h]”hŒÿThe race avoidance algorithm does not provide a way to determine which exact CPUs within the cluster play these roles. This must be decided in advance by some other means. Refer to the section “Last man and first man selectionâ€� for more explanation.”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÕubhÌ)�”}”(hŒdCLUSTER_DOWN/INBOUND_NOT_COMING_UP is the only state where the cluster can actually be powered down.”h]”hŒdCLUSTER_DOWN/INBOUND_NOT_COMING_UP is the only state where the cluster can actually be powered down.”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÕubhÌ)�”}”(hXLThe parallelism of the inbound and outbound CPUs is observed by the existence of two different paths from CLUSTER_GOING_DOWN/ INBOUND_NOT_COMING_UP (corresponding to GOING_DOWN in the basic model) to CLUSTER_DOWN/INBOUND_COMING_UP (corresponding to COMING_UP in the basic model). The second path avoids cluster teardown completely.”h]”hXLThe parallelism of the inbound and outbound CPUs is observed by the existence of two different paths from CLUSTER_GOING_DOWN/ INBOUND_NOT_COMING_UP (corresponding to GOING_DOWN in the basic model) to CLUSTER_DOWN/INBOUND_COMING_UP (corresponding to COMING_UP in the basic model). The second path avoids cluster teardown completely.”…”�”}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÕubhÌ)�”}”(hŒÇCLUSTER_UP/INBOUND_COMING_UP is equivalent to UP in the basic model. The final transition to CLUSTER_UP/INBOUND_NOT_COMING_UP is trivial and merely resets the state machine ready for the next cycle.”h]”hŒÇCLUSTER_UP/INBOUND_COMING_UP is equivalent to UP in the basic model. The final transition to CLUSTER_UP/INBOUND_NOT_COMING_UP is trivial and merely resets the state machine ready for the next cycle.”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÕubhÌ)�”}”(hŒ,Details of the allowable transitions follow.”h]”hŒ,Details of the allowable transitions follow.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M$hjÕubhÌ)�”}”(hŒ&The next state in each case is notated”h]”hŒ&The next state in each case is notated”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M&hjÕubjh)�”}”(hŒ1/ () ”h]”hÌ)�”}”(hŒ0/ ()”h]”hŒ0/ ()”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M(hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´M(hjÕubhÌ)�”}”(hŒpwhere the is the side on which the transition can occur; either the inbound or the outbound side.”h]”hŒpwhere the is the side on which the transition can occur; either the inbound or the outbound side.”…”�”}”(hj4 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M*hjÕubeh}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´Kæhjšh²hubjò)�”}”(hhh]”j÷)�”}”(hX0CLUSTER_DOWN/INBOUND_NOT_COMING_UP: Next state: CLUSTER_DOWN/INBOUND_COMING_UP (inbound) Conditions: none Trigger events: a) an explicit hardware power-up operation, resulting from a policy decision on another CPU; b) a hardware event, such as an interrupt. ”h]”(jý)�”}”(hŒ#CLUSTER_DOWN/INBOUND_NOT_COMING_UP:”h]”hŒ#CLUSTER_DOWN/INBOUND_NOT_COMING_UP:”…”�”}”(hjO h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M9hjK ubj )�”}”(hhh]”jò)�”}”(hhh]”(j÷)�”}”(hŒ4Next state: CLUSTER_DOWN/INBOUND_COMING_UP (inbound)”h]”(jý)�”}”(hŒ Next state:”h]”hŒ Next state:”…”�”}”(hjg h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M/hjc ubj )�”}”(hhh]”hÌ)�”}”(hŒ(CLUSTER_DOWN/INBOUND_COMING_UP (inbound)”h]”hŒ(CLUSTER_DOWN/INBOUND_COMING_UP (inbound)”…”�”}”(hjx h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M0hju ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjc ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M/hj` ubj÷)�”}”(hŒConditions: none ”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hj– h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M2hj’ ubj )�”}”(hhh]”hÌ)�”}”(hŒnone”h]”hŒnone”…”�”}”(hj§ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M2hj¤ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj’ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M2hj` ubj÷)�”}”(hŒ�Trigger events: a) an explicit hardware power-up operation, resulting from a policy decision on another CPU; b) a hardware event, such as an interrupt. ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hjÅ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M9hjÁ ubj )�”}”(hhh]”j¨)�”}”(hhh]”(js)�”}”(hŒZan explicit hardware power-up operation, resulting from a policy decision on another CPU; ”h]”hÌ)�”}”(hŒYan explicit hardware power-up operation, resulting from a policy decision on another CPU;”h]”hŒYan explicit hardware power-up operation, resulting from a policy decision on another CPU;”…”�”}”(hjÝ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M5hjÙ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjÖ ubjs)�”}”(hŒ)a hardware event, such as an interrupt. ”h]”hÌ)�”}”(hŒ'a hardware event, such as an interrupt.”h]”hŒ'a hardware event, such as an interrupt.”…”�”}”(hjõ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M8hjñ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhjÖ ubeh}”(h]”h ]”h"]”h$]”h&]”jâjãjähjåjæuh1j§hjÓ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjÁ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M9hj` ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhj] ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjK ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M9hjH ubah}”(h]”h ]”h"]”h$]”h&]”uh1jñhjšh²hh³Nh´NubhÌ)�”}”(hŒCLUSTER_DOWN/INBOUND_COMING_UP:”h]”hŒCLUSTER_DOWN/INBOUND_COMING_UP:”…”�”}”(hj3 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M;hjšh²hubjh)�”}”(hXIn this state, an inbound CPU sets up the cluster, including enabling of hardware coherency at the cluster level and any other operations (such as cache invalidation) which are required in order to achieve this. The purpose of this state is to do sufficient cluster-level setup to enable other CPUs in the cluster to enter coherency safely. Next state: CLUSTER_UP/INBOUND_COMING_UP (inbound) Conditions: cluster-level setup and hardware coherency complete Trigger events: (spontaneous) ”h]”(hÌ)�”}”(hŒÓIn this state, an inbound CPU sets up the cluster, including enabling of hardware coherency at the cluster level and any other operations (such as cache invalidation) which are required in order to achieve this.”h]”hŒÓIn this state, an inbound CPU sets up the cluster, including enabling of hardware coherency at the cluster level and any other operations (such as cache invalidation) which are required in order to achieve this.”…”�”}”(hjE h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M=hjA ubhÌ)�”}”(hŒ€The purpose of this state is to do sufficient cluster-level setup to enable other CPUs in the cluster to enter coherency safely.”h]”hŒ€The purpose of this state is to do sufficient cluster-level setup to enable other CPUs in the cluster to enter coherency safely.”…”�”}”(hjS h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MBhjA ubjò)�”}”(hhh]”(j÷)�”}”(hŒ2Next state: CLUSTER_UP/INBOUND_COMING_UP (inbound)”h]”(jý)�”}”(hŒ Next state:”h]”hŒ Next state:”…”�”}”(hjh h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´MFhjd ubj )�”}”(hhh]”hÌ)�”}”(hŒ&CLUSTER_UP/INBOUND_COMING_UP (inbound)”h]”hŒ&CLUSTER_UP/INBOUND_COMING_UP (inbound)”…”�”}”(hjy h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MGhjv ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjd ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´MFhja ubj÷)�”}”(hŒ?Conditions: cluster-level setup and hardware coherency complete”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hj— h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´MHhj“ ubj )�”}”(hhh]”hÌ)�”}”(hŒ3cluster-level setup and hardware coherency complete”h]”hŒ3cluster-level setup and hardware coherency complete”…”�”}”(hj¨ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MIhj¥ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj“ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´MHhja ubj÷)�”}”(hŒTrigger events: (spontaneous) ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hjÆ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´MLhj ubj )�”}”(hhh]”hÌ)�”}”(hŒ (spontaneous)”h]”hŒ (spontaneous)”…”�”}”(hj× h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MKhjÔ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´MLhja ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjA ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´M=hjšh²hubhÌ)�”}”(hŒCLUSTER_UP/INBOUND_COMING_UP:”h]”hŒCLUSTER_UP/INBOUND_COMING_UP:”…”�”}”(hjý h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MNhjšh²hubjh)�”}”(hX´Cluster-level setup is complete and hardware coherency is enabled for the cluster. Other CPUs in the cluster can safely enter coherency. This is a transient state, leading immediately to CLUSTER_UP/INBOUND_NOT_COMING_UP. All other CPUs on the cluster should consider treat these two states as equivalent. Next state: CLUSTER_UP/INBOUND_NOT_COMING_UP (inbound) Conditions: none Trigger events: (spontaneous) ”h]”(hÌ)�”}”(hŒ‰Cluster-level setup is complete and hardware coherency is enabled for the cluster. Other CPUs in the cluster can safely enter coherency.”h]”hŒ‰Cluster-level setup is complete and hardware coherency is enabled for the cluster. Other CPUs in the cluster can safely enter coherency.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MPhj ubhÌ)�”}”(hŒ¨This is a transient state, leading immediately to CLUSTER_UP/INBOUND_NOT_COMING_UP. All other CPUs on the cluster should consider treat these two states as equivalent.”h]”hŒ¨This is a transient state, leading immediately to CLUSTER_UP/INBOUND_NOT_COMING_UP. All other CPUs on the cluster should consider treat these two states as equivalent.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MThj ubjò)�”}”(hhh]”(j÷)�”}”(hŒ6Next state: CLUSTER_UP/INBOUND_NOT_COMING_UP (inbound)”h]”(jý)�”}”(hŒ Next state:”h]”hŒ Next state:”…”�”}”(hj2 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´MXhj. ubj )�”}”(hhh]”hÌ)�”}”(hŒ*CLUSTER_UP/INBOUND_NOT_COMING_UP (inbound)”h]”hŒ*CLUSTER_UP/INBOUND_NOT_COMING_UP (inbound)”…”�”}”(hjC h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MYhj@ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj. ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´MXhj+ ubj÷)�”}”(hŒConditions: none”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hja h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´MZhj] ubj )�”}”(hhh]”hÌ)�”}”(hŒnone”h]”hŒnone”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M[hjo ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj] ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´MZhj+ ubj÷)�”}”(hŒTrigger events: (spontaneous) ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M^hjŒ ubj )�”}”(hhh]”hÌ)�”}”(hŒ (spontaneous)”h]”hŒ (spontaneous)”…”�”}”(hj¡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M]hjž ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjŒ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M^hj+ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´MPhjšh²hubhÌ)�”}”(hŒ!CLUSTER_UP/INBOUND_NOT_COMING_UP:”h]”hŒ!CLUSTER_UP/INBOUND_NOT_COMING_UP:”…”�”}”(hjÇ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M`hjšh²hubjh)�”}”(hX‘Cluster-level setup is complete and hardware coherency is enabled for the cluster. Other CPUs in the cluster can safely enter coherency. The cluster will remain in this state until a policy decision is made to power the cluster down. Next state: CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP (outbound) Conditions: none Trigger events: policy decision to power down the cluster ”h]”(hÌ)�”}”(hŒ‰Cluster-level setup is complete and hardware coherency is enabled for the cluster. Other CPUs in the cluster can safely enter coherency.”h]”hŒ‰Cluster-level setup is complete and hardware coherency is enabled for the cluster. Other CPUs in the cluster can safely enter coherency.”…”�”}”(hjÙ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MbhjÕ ubhÌ)�”}”(hŒ`The cluster will remain in this state until a policy decision is made to power the cluster down.”h]”hŒ`The cluster will remain in this state until a policy decision is made to power the cluster down.”…”�”}”(hjç h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MfhjÕ ubjò)�”}”(hhh]”(j÷)�”}”(hŒ?Next state: CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP (outbound)”h]”(jý)�”}”(hŒ Next state:”h]”hŒ Next state:”…”�”}”(hjü h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´Mihjø ubj )�”}”(hhh]”hÌ)�”}”(hŒ3CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP (outbound)”h]”hŒ3CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP (outbound)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mjhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjø ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´Mihjõ ubj÷)�”}”(hŒConditions: none”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hj+ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´Mkhj' ubj )�”}”(hhh]”hÌ)�”}”(hŒnone”h]”hŒnone”…”�”}”(hj< h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mlhj9 ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj' ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´Mkhjõ ubj÷)�”}”(hŒ;Trigger events: policy decision to power down the cluster ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hjZ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´MohjV ubj )�”}”(hhh]”hÌ)�”}”(hŒ)policy decision to power down the cluster”h]”hŒ)policy decision to power down the cluster”…”�”}”(hjk h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mnhjh ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjV ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´Mohjõ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjÕ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´Mbhjšh²hubhÌ)�”}”(hŒ)CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP:”h]”hŒ)CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP:”…”�”}”(hj‘ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mqhjšh²hubjh)�”}”(hXAn outbound CPU is tearing the cluster down. The selected CPU must wait in this state until all CPUs in the cluster are in the CPU_DOWN state. When all CPUs are in the CPU_DOWN state, the cluster can be torn down, for example by cleaning data caches and exiting cluster-level coherency. To avoid wasteful unnecessary teardown operations, the outbound should check the inbound cluster state for asynchronous transitions to INBOUND_COMING_UP. Alternatively, individual CPUs can be checked for entry into CPU_COMING_UP or CPU_UP. Next states: CLUSTER_DOWN/INBOUND_NOT_COMING_UP (outbound) Conditions: cluster torn down and ready to power off Trigger events: (spontaneous) CLUSTER_GOING_DOWN/INBOUND_COMING_UP (inbound) Conditions: none Trigger events: a) an explicit hardware power-up operation, resulting from a policy decision on another CPU; b) a hardware event, such as an interrupt. ”h]”(hÌ)�”}”(hŒ�An outbound CPU is tearing the cluster down. The selected CPU must wait in this state until all CPUs in the cluster are in the CPU_DOWN state.”h]”hŒ�An outbound CPU is tearing the cluster down. The selected CPU must wait in this state until all CPUs in the cluster are in the CPU_DOWN state.”…”�”}”(hj£ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MshjŸ ubhÌ)�”}”(hŒ�When all CPUs are in the CPU_DOWN state, the cluster can be torn down, for example by cleaning data caches and exiting cluster-level coherency.”h]”hŒ�When all CPUs are in the CPU_DOWN state, the cluster can be torn down, for example by cleaning data caches and exiting cluster-level coherency.”…”�”}”(hj± h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MwhjŸ ubhÌ)�”}”(hŒðTo avoid wasteful unnecessary teardown operations, the outbound should check the inbound cluster state for asynchronous transitions to INBOUND_COMING_UP. Alternatively, individual CPUs can be checked for entry into CPU_COMING_UP or CPU_UP.”h]”hŒðTo avoid wasteful unnecessary teardown operations, the outbound should check the inbound cluster state for asynchronous transitions to INBOUND_COMING_UP. Alternatively, individual CPUs can be checked for entry into CPU_COMING_UP or CPU_UP.”…”�”}”(hj¿ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M{hjŸ ubhÌ)�”}”(hŒ Next states:”h]”hŒ Next states:”…”�”}”(hjÍ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M�hjŸ ubjò)�”}”(hhh]”(j÷)�”}”(hŒ‘CLUSTER_DOWN/INBOUND_NOT_COMING_UP (outbound) Conditions: cluster torn down and ready to power off Trigger events: (spontaneous) ”h]”(jý)�”}”(hŒ-CLUSTER_DOWN/INBOUND_NOT_COMING_UP (outbound)”h]”hŒ-CLUSTER_DOWN/INBOUND_NOT_COMING_UP (outbound)”…”�”}”(hjâ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M‡hjÞ ubj )�”}”(hhh]”jò)�”}”(hhh]”(j÷)�”}”(hŒ4Conditions: cluster torn down and ready to power off”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hjú h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M„hjö ubj )�”}”(hhh]”hÌ)�”}”(hŒ(cluster torn down and ready to power off”h]”hŒ(cluster torn down and ready to power off”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M…hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjö ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M„hjó ubj÷)�”}”(hŒTrigger events: (spontaneous) ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hj) h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M‡hj% ubj )�”}”(hhh]”hÌ)�”}”(hŒ (spontaneous)”h]”hŒ (spontaneous)”…”�”}”(hj: h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M‡hj7 ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj% ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M‡hjó ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjð ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjÞ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M‡hjÛ ubj÷)�”}”(hX CLUSTER_GOING_DOWN/INBOUND_COMING_UP (inbound) Conditions: none Trigger events: a) an explicit hardware power-up operation, resulting from a policy decision on another CPU; b) a hardware event, such as an interrupt. ”h]”(jý)�”}”(hŒ.CLUSTER_GOING_DOWN/INBOUND_COMING_UP (inbound)”h]”hŒ.CLUSTER_GOING_DOWN/INBOUND_COMING_UP (inbound)”…”�”}”(hjj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M“hjf ubj )�”}”(hhh]”jò)�”}”(hhh]”(j÷)�”}”(hŒConditions: none ”h]”(jý)�”}”(hŒ Conditions:”h]”hŒ Conditions:”…”�”}”(hj‚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M‹hj~ ubj )�”}”(hhh]”hÌ)�”}”(hŒnone”h]”hŒnone”…”�”}”(hj“ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M‹hj� ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj~ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M‹hj{ ubj÷)�”}”(hŒ Trigger events: a) an explicit hardware power-up operation, resulting from a policy decision on another CPU; b) a hardware event, such as an interrupt. ”h]”(jý)�”}”(hŒTrigger events:”h]”hŒTrigger events:”…”�”}”(hj± h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jüh³hÊh´M“hj­ ubj )�”}”(hhh]”j¨)�”}”(hhh]”(js)�”}”(hŒZan explicit hardware power-up operation, resulting from a policy decision on another CPU; ”h]”hÌ)�”}”(hŒYan explicit hardware power-up operation, resulting from a policy decision on another CPU;”h]”hŒYan explicit hardware power-up operation, resulting from a policy decision on another CPU;”…”�”}”(hjÉ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MŽhjÅ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhj ubjs)�”}”(hŒ)a hardware event, such as an interrupt. ”h]”hÌ)�”}”(hŒ'a hardware event, such as an interrupt.”h]”hŒ'a hardware event, such as an interrupt.”…”�”}”(hjá h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M’hjÝ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhj ubeh}”(h]”h ]”h"]”h$]”h&]”jâjãjähjåjæuh1j§hj¿ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj­ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M“hj{ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjx ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjf ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jöh³hÊh´M“hjÛ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jñhjŸ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´Mshjšh²hubhÌ)�”}”(hŒ%CLUSTER_GOING_DOWN/INBOUND_COMING_UP:”h]”hŒ%CLUSTER_GOING_DOWN/INBOUND_COMING_UP:”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M•hjšh²hubjh)�”}”(hXThe cluster is (or was) being torn down, but another CPU has come online in the meantime and is trying to set up the cluster again. If the outbound CPU observes this state, it has two choices: a) back out of teardown, restoring the cluster to the CLUSTER_UP state; b) finish tearing the cluster down and put the cluster in the CLUSTER_DOWN state; the inbound CPU will set up the cluster again from there. Choice (a) permits the removal of some latency by avoiding unnecessary teardown and setup operations in situations where the cluster is not really going to be powered down. Next states: CLUSTER_UP/INBOUND_COMING_UP (outbound) Conditions: cluster-level setup and hardware coherency complete Trigger events: (spontaneous) CLUSTER_DOWN/INBOUND_COMING_UP (outbound) Conditions: cluster torn down and ready to power off Trigger events: (spontaneous) ”h]”(hÌ)�”}”(hŒƒThe cluster is (or was) being torn down, but another CPU has come online in the meantime and is trying to set up the cluster again.”h]”hŒƒThe cluster is (or was) being torn down, but another CPU has come online in the meantime and is trying to set up the cluster again.”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M—hj3ubhÌ)�”}”(hŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÒhjÙh²hubhÌ)�”}”(hŒjCluster-level initialisation may involve actions such as configuring coherency controls in the bus fabric.”h]”hŒjCluster-level initialisation may involve actions such as configuring coherency controls in the bus fabric.”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MØhjÙh²hubhÌ)�”}”(hŒ£The current implementation in mcpm_head.S uses a separate mutual exclusion mechanism to do this arbitration. This mechanism is documented in detail in vlocks.txt.”h]”hŒ£The current implementation in mcpm_head.S uses a separate mutual exclusion mechanism to do this arbitration. This mechanism is documented in detail in vlocks.txt.”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÛhjÙh²hubeh}”(h]”Œ last-man-and-first-man-selection”ah ]”h"]”Œ last man and first man selection”ah$]”h&]”uh1hµhh·h²hh³hÊh´M¼ubh¶)�”}”(hhh]”(h»)�”}”(hŒFeatures and Limitations”h]”hŒFeatures and Limitations”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjph²hh³hÊh´MáubhÌ)�”}”(hŒImplementation:”h]”hŒImplementation:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mãhjph²hubjh)�”}”(hX”The current ARM-based implementation is split between arch/arm/common/mcpm_head.S (low-level inbound CPU operations) and arch/arm/common/mcpm_entry.c (everything else): __mcpm_cpu_going_down() signals the transition of a CPU to the CPU_GOING_DOWN state. __mcpm_cpu_down() signals the transition of a CPU to the CPU_DOWN state. A CPU transitions to CPU_COMING_UP and then to CPU_UP via the low-level power-up code in mcpm_head.S. This could involve CPU-specific setup code, but in the current implementation it does not. __mcpm_outbound_enter_critical() and __mcpm_outbound_leave_critical() handle transitions from CLUSTER_UP to CLUSTER_GOING_DOWN and from there to CLUSTER_DOWN or back to CLUSTER_UP (in the case of an aborted cluster power-down). These functions are more complex than the __mcpm_cpu_*() functions due to the extra inter-CPU coordination which is needed for safe transitions at the cluster level. A cluster transitions from CLUSTER_DOWN back to CLUSTER_UP via the low-level power-up code in mcpm_head.S. This typically involves platform-specific setup code, provided by the platform-specific power_up_setup function registered via mcpm_sync_init. ”h]”(hÌ)�”}”(hŒ¨The current ARM-based implementation is split between arch/arm/common/mcpm_head.S (low-level inbound CPU operations) and arch/arm/common/mcpm_entry.c (everything else):”h]”hŒ¨The current ARM-based implementation is split between arch/arm/common/mcpm_head.S (low-level inbound CPU operations) and arch/arm/common/mcpm_entry.c (everything else):”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Måhj�ubhÌ)�”}”(hŒT__mcpm_cpu_going_down() signals the transition of a CPU to the CPU_GOING_DOWN state.”h]”hŒT__mcpm_cpu_going_down() signals the transition of a CPU to the CPU_GOING_DOWN state.”…”�”}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Méhj�ubhÌ)�”}”(hŒH__mcpm_cpu_down() signals the transition of a CPU to the CPU_DOWN state.”h]”hŒH__mcpm_cpu_down() signals the transition of a CPU to the CPU_DOWN state.”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mìhj�ubhÌ)�”}”(hŒÁA CPU transitions to CPU_COMING_UP and then to CPU_UP via the low-level power-up code in mcpm_head.S. This could involve CPU-specific setup code, but in the current implementation it does not.”h]”hŒÁA CPU transitions to CPU_COMING_UP and then to CPU_UP via the low-level power-up code in mcpm_head.S. This could involve CPU-specific setup code, but in the current implementation it does not.”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mïhj�ubhÌ)�”}”(hŒã__mcpm_outbound_enter_critical() and __mcpm_outbound_leave_critical() handle transitions from CLUSTER_UP to CLUSTER_GOING_DOWN and from there to CLUSTER_DOWN or back to CLUSTER_UP (in the case of an aborted cluster power-down).”h]”hŒã__mcpm_outbound_enter_critical() and __mcpm_outbound_leave_critical() handle transitions from CLUSTER_UP to CLUSTER_GOING_DOWN and from there to CLUSTER_DOWN or back to CLUSTER_UP (in the case of an aborted cluster power-down).”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Môhj�ubhÌ)�”}”(hŒ¥These functions are more complex than the __mcpm_cpu_*() functions due to the extra inter-CPU coordination which is needed for safe transitions at the cluster level.”h]”hŒ¥These functions are more complex than the __mcpm_cpu_*() functions due to the extra inter-CPU coordination which is needed for safe transitions at the cluster level.”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mùhj�ubhÌ)�”}”(hŒúA cluster transitions from CLUSTER_DOWN back to CLUSTER_UP via the low-level power-up code in mcpm_head.S. This typically involves platform-specific setup code, provided by the platform-specific power_up_setup function registered via mcpm_sync_init.”h]”hŒúA cluster transitions from CLUSTER_DOWN back to CLUSTER_UP via the low-level power-up code in mcpm_head.S. This typically involves platform-specific setup code, provided by the platform-specific power_up_setup function registered via mcpm_sync_init.”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mýhj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´Måhjph²hubhÌ)�”}”(hŒDeep topologies:”h]”hŒDeep topologies:”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjph²hubjh)�”}”(hXnAs currently described and implemented, the algorithm does not support CPU topologies involving more than two levels (i.e., clusters of clusters are not supported). The algorithm could be extended by replicating the cluster-level states for the additional topological levels, and modifying the transition rules for the intermediate (non-outermost) cluster levels. ”h]”hÌ)�”}”(hXlAs currently described and implemented, the algorithm does not support CPU topologies involving more than two levels (i.e., clusters of clusters are not supported). The algorithm could be extended by replicating the cluster-level states for the additional topological levels, and modifying the transition rules for the intermediate (non-outermost) cluster levels.”h]”hXlAs currently described and implemented, the algorithm does not support CPU topologies involving more than two levels (i.e., clusters of clusters are not supported). The algorithm could be extended by replicating the cluster-level states for the additional topological levels, and modifying the transition rules for the intermediate (non-outermost) cluster levels.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jgh³hÊh´Mhjph²hubeh}”(h]”Œfeatures-and-limitations”ah ]”h"]”Œfeatures and limitations”ah$]”h&]”uh1hµhh·h²hh³hÊh´Máubh¶)�”}”(hhh]”(h»)�”}”(hŒColophon”h]”hŒColophon”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj)h²hh³hÊh´MubhÌ)�”}”(hŒyOriginally created and documented by Dave Martin for Linaro Limited, in collaboration with Nicolas Pitre and Achin Gupta.”h]”hŒyOriginally created and documented by Dave Martin for Linaro Limited, in collaboration with Nicolas Pitre and Achin Gupta.”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj)h²hubhÌ)�”}”(hŒ�Copyright (C) 2012-2013 Linaro Limited Distributed under the terms of Version 2 of the GNU General Public License, as defined in linux/COPYING.”h]”hŒ�Copyright (C) 2012-2013 Linaro Limited Distributed under the terms of Version 2 of the GNU General Public License, as defined in linux/COPYING.”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj)h²hubeh}”(h]”Œcolophon”ah ]”h"]”Œcolophon”ah$]”h&]”uh1hµhh·h²hh³hÊh´Mubeh}”(h]”Œ9cluster-wide-power-up-power-down-race-avoidance-algorithm”ah ]”h"]”Œ9cluster-wide power-up/power-down race avoidance algorithm”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”}”(jcj`jEjBj%j"j—j”jÖjÓjmjjj&j#j[jXuŒ nametypes”}”(jc‰jE‰j%‰j—‰jÖ‰jm‰j&‰j[‰uh}”(j`h·jBhéj"jHj”j(jÓjšjjjÙj#jpjXj)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.