€• –Œ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/power/pm_qos_interface”Œ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/power/pm_qos_interface”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/power/pm_qos_interface”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/power/pm_qos_interface”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/power/pm_qos_interface”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/pt_BR/power/pm_qos_interface”Œ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/power/pm_qos_interface”Œ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ŒPM Quality Of Service Interface”h]”hŒPM Quality Of Service Interface”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒD/var/lib/git/docbuild/linux/Documentation/power/pm_qos_interface.rst”h´KubhŒ paragraph”“”)�”}”(hŒ®This interface provides a kernel and user mode interface for registering performance expectations by drivers, subsystems and user space applications on one of the parameters.”h]”hŒ®This interface provides a kernel and user mode interface for registering performance expectations by drivers, subsystems and user space applications on one of the parameters.”…”�”}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhŒdefinition_list”“”)�”}”(hhh]”hŒdefinition_list_item”“”)�”}”(hŒ¶Two different PM QoS frameworks are available: * CPU latency QoS. * The per-device PM QoS framework provides the API to manage the per-device latency constraints and PM QoS flags. ”h]”(hŒterm”“”)�”}”(hŒ.Two different PM QoS frameworks are available:”h]”hŒ.Two different PM QoS frameworks are available:”…”�”}”(hhèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K hhâubhŒ definition”“”)�”}”(hhh]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒCPU latency QoS.”h]”hÌ)�”}”(hjh]”hŒCPU latency QoS.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhhýubj)�”}”(hŒpThe per-device PM QoS framework provides the API to manage the per-device latency constraints and PM QoS flags. ”h]”hÌ)�”}”(hŒoThe per-device PM QoS framework provides the API to manage the per-device latency constraints and PM QoS flags.”h]”hŒoThe per-device PM QoS framework provides the API to manage the per-device latency constraints and PM QoS flags.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhhýubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1hûh³hÊh´K hhøubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhâubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K hhÝubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhh·h²hh³Nh´NubhÌ)�”}”(hŒHThe latency unit used in the PM QoS framework is the microsecond (usec).”h]”hŒHThe latency unit used in the PM QoS framework is the microsecond (usec).”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ1. PM QoS framework”h]”hŒ1. PM QoS framework”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjYh²hh³hÊh´KubhÌ)�”}”(hXAA global list of CPU latency QoS requests is maintained along with an aggregated (effective) target value. The aggregated target value is updated with changes to the request list or elements of the list. For CPU latency QoS, the aggregated target value is simply the min of the request values held in the list elements.”h]”hXAA global list of CPU latency QoS requests is maintained along with an aggregated (effective) target value. The aggregated target value is updated with changes to the request list or elements of the list. For CPU latency QoS, the aggregated target value is simply the min of the request values held in the list elements.”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjYh²hubhÌ)�”}”(hŒ“Note: the aggregated target value is implemented as an atomic variable so that reading the aggregated value does not require any locking mechanism.”h]”hŒ“Note: the aggregated target value is implemented as an atomic variable so that reading the aggregated value does not require any locking mechanism.”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjYh²hubhÌ)�”}”(hŒ6From kernel space the use of this interface is simple:”h]”hŒ6From kernel space the use of this interface is simple:”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjYh²hubhÜ)�”}”(hhh]”(há)�”}”(hXnvoid cpu_latency_qos_add_request(handle, target_value): Will insert an element into the CPU latency QoS list with the target value. Upon change to this list the new target is recomputed and any registered notifiers are called only if the target value is now different. Clients of PM QoS need to save the returned handle for future use in other PM QoS API functions. ”h]”(hç)�”}”(hŒ7void cpu_latency_qos_add_request(handle, target_value):”h]”hŒ7void cpu_latency_qos_add_request(handle, target_value):”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K$hj—ubh÷)�”}”(hhh]”hÌ)�”}”(hX5Will insert an element into the CPU latency QoS list with the target value. Upon change to this list the new target is recomputed and any registered notifiers are called only if the target value is now different. Clients of PM QoS need to save the returned handle for future use in other PM QoS API functions.”h]”hX5Will insert an element into the CPU latency QoS list with the target value. Upon change to this list the new target is recomputed and any registered notifiers are called only if the target value is now different. Clients of PM QoS need to save the returned handle for future use in other PM QoS API functions.”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hj©ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj—ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K$hj”ubhá)�”}”(hŒðvoid cpu_latency_qos_update_request(handle, new_target_value): Will update the list element pointed to by the handle with the new target value and recompute the new aggregated target, calling the notification tree if the target is changed. ”h]”(hç)�”}”(hŒ>void cpu_latency_qos_update_request(handle, new_target_value):”h]”hŒ>void cpu_latency_qos_update_request(handle, new_target_value):”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K)hjÆubh÷)�”}”(hhh]”hÌ)�”}”(hŒ°Will update the list element pointed to by the handle with the new target value and recompute the new aggregated target, calling the notification tree if the target is changed.”h]”hŒ°Will update the list element pointed to by the handle with the new target value and recompute the new aggregated target, calling the notification tree if the target is changed.”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K'hjØubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjÆubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K)hj”h²hubhá)�”}”(hŒ×void cpu_latency_qos_remove_request(handle): Will remove the element. After removal it will update the aggregate target and call the notification tree if the target was changed as a result of removing the request. ”h]”(hç)�”}”(hŒ,void cpu_latency_qos_remove_request(handle):”h]”hŒ,void cpu_latency_qos_remove_request(handle):”…”�”}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K.hjõubh÷)�”}”(hhh]”hÌ)�”}”(hŒ©Will remove the element. After removal it will update the aggregate target and call the notification tree if the target was changed as a result of removing the request.”h]”hŒ©Will remove the element. After removal it will update the aggregate target and call the notification tree if the target was changed as a result of removing the request.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K,hjubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjõubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K.hj”h²hubhá)�”}”(hŒSint cpu_latency_qos_limit(): Returns the aggregated value for the CPU latency QoS. ”h]”(hç)�”}”(hŒint cpu_latency_qos_limit():”h]”hŒint cpu_latency_qos_limit():”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K1hj$ubh÷)�”}”(hhh]”hÌ)�”}”(hŒ5Returns the aggregated value for the CPU latency QoS.”h]”hŒ5Returns the aggregated value for the CPU latency QoS.”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K1hj6ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj$ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K1hj”h²hubhá)�”}”(hŒ‘int cpu_latency_qos_request_active(handle): Returns if the request is still active, i.e. it has not been removed from the CPU latency QoS list. ”h]”(hç)�”}”(hŒ+int cpu_latency_qos_request_active(handle):”h]”hŒ+int cpu_latency_qos_request_active(handle):”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K6hjSubh÷)�”}”(hhh]”hÌ)�”}”(hŒcReturns if the request is still active, i.e. it has not been removed from the CPU latency QoS list.”h]”hŒcReturns if the request is still active, i.e. it has not been removed from the CPU latency QoS list.”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K4hjeubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjSubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K6hj”h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjYh²hh³hÊh´NubhÌ)�”}”(hŒFrom user space:”h]”hŒFrom user space:”…”�”}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K8hjYh²hubhÌ)�”}”(hŒ¥The infrastructure exposes two separate device nodes, /dev/cpu_dma_latency for the CPU latency QoS and /dev/cpu_wakeup_latency for the CPU system wakeup latency QoS.”h]”hŒ¥The infrastructure exposes two separate device nodes, /dev/cpu_dma_latency for the CPU latency QoS and /dev/cpu_wakeup_latency for the CPU system wakeup latency QoS.”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K:hjYh²hubhÌ)�”}”(hŒ¯Only processes can register a PM QoS request. To provide for automatic cleanup of a process, the interface requires the process to register its parameter requests as follows.”h]”hŒ¯Only processes can register a PM QoS request. To provide for automatic cleanup of a process, the interface requires the process to register its parameter requests as follows.”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K>hjYh²hubhÌ)�”}”(hŒÅTo register the default PM QoS target for the CPU latency QoS, the process must open /dev/cpu_dma_latency. To register a CPU system wakeup QoS limit, the process must open /dev/cpu_wakeup_latency.”h]”hŒÅTo register the default PM QoS target for the CPU latency QoS, the process must open /dev/cpu_dma_latency. To register a CPU system wakeup QoS limit, the process must open /dev/cpu_wakeup_latency.”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KBhjYh²hubhÌ)�”}”(hŒ_As long as the device node is held open that process has a registered request on the parameter.”h]”hŒ_As long as the device node is held open that process has a registered request on the parameter.”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KFhjYh²hubhÌ)�”}”(hŒÏTo change the requested target value, the process needs to write an s32 value to the open device node. Alternatively, it can write a hex string for the value using the 10 char long format e.g. "0x12345678".”h]”hŒÓTo change the requested target value, the process needs to write an s32 value to the open device node. Alternatively, it can write a hex string for the value using the 10 char long format e.g. “0x12345678â€�.”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KIhjYh²hubhÌ)�”}”(hŒPTo remove the user mode request for a target value simply close the device node.”h]”hŒPTo remove the user mode request for a target value simply close the device node.”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KMhjYh²hubeh}”(h]”Œpm-qos-framework”ah ]”h"]”Œ1. pm qos framework”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ02. PM QoS per-device latency and flags framework”h]”hŒ02. PM QoS per-device latency and flags framework”…”�”}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjòh²hh³hÊh´KRubhÌ)�”}”(hX$For each device, there are three lists of PM QoS requests. Two of them are maintained along with the aggregated targets of resume latency and active state latency tolerance (in microseconds) and the third one is for PM QoS flags. Values are updated in response to changes of the request list.”h]”hX$For each device, there are three lists of PM QoS requests. Two of them are maintained along with the aggregated targets of resume latency and active state latency tolerance (in microseconds) and the third one is for PM QoS flags. Values are updated in response to changes of the request list.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KThjòh²hubhÌ)�”}”(hX8The target values of resume latency and active state latency tolerance are simply the minimum of the request values held in the parameter list elements. The PM QoS flags aggregate value is a gather (bitwise OR) of all list elements' values. One device PM QoS flag is defined currently: PM_QOS_FLAG_NO_POWER_OFF.”h]”hX:The target values of resume latency and active state latency tolerance are simply the minimum of the request values held in the parameter list elements. The PM QoS flags aggregate value is a gather (bitwise OR) of all list elements’ values. One device PM QoS flag is defined currently: PM_QOS_FLAG_NO_POWER_OFF.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KYhjòh²hubhÌ)�”}”(hŒŠNote: The aggregated target values are implemented in such a way that reading the aggregated value does not require any locking mechanism.”h]”hŒŠNote: The aggregated target values are implemented in such a way that reading the aggregated value does not require any locking mechanism.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K^hjòh²hubhÌ)�”}”(hŒubh÷)�”}”(hhh]”hÌ)�”}”(hX@Will insert an element into the list for that identified device with the target value. Upon change to this list the new target is recomputed and any registered notifiers are called only if the target value is now different. Clients of dev_pm_qos need to save the handle for future use in other dev_pm_qos API functions.”h]”hX@Will insert an element into the list for that identified device with the target value. Upon change to this list the new target is recomputed and any registered notifiers are called only if the target value is now different. Clients of dev_pm_qos need to save the handle for future use in other dev_pm_qos API functions.”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KehjPubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj>ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´Kihj;ubhá)�”}”(hŒäint dev_pm_qos_update_request(handle, new_value): Will update the list element pointed to by the handle with the new target value and recompute the new aggregated target, calling the notification trees if the target is changed. ”h]”(hç)�”}”(hŒ1int dev_pm_qos_update_request(handle, new_value):”h]”hŒ1int dev_pm_qos_update_request(handle, new_value):”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´Knhjmubh÷)�”}”(hhh]”hÌ)�”}”(hŒ±Will update the list element pointed to by the handle with the new target value and recompute the new aggregated target, calling the notification trees if the target is changed.”h]”hŒ±Will update the list element pointed to by the handle with the new target value and recompute the new aggregated target, calling the notification trees if the target is changed.”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Klhjubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjmubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´Knhj;h²hubhá)�”}”(hŒÒint dev_pm_qos_remove_request(handle): Will remove the element. After removal it will update the aggregate target and call the notification trees if the target was changed as a result of removing the request. ”h]”(hç)�”}”(hŒ&int dev_pm_qos_remove_request(handle):”h]”hŒ&int dev_pm_qos_remove_request(handle):”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´Kshjœubh÷)�”}”(hhh]”hÌ)�”}”(hŒªWill remove the element. After removal it will update the aggregate target and call the notification trees if the target was changed as a result of removing the request.”h]”hŒªWill remove the element. After removal it will update the aggregate target and call the notification trees if the target was changed as a result of removing the request.”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kqhj®ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjœubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´Kshj;h²hubhá)�”}”(hŒms32 dev_pm_qos_read_value(device, type): Returns the aggregated value for a given device's constraints list. ”h]”(hç)�”}”(hŒ(s32 dev_pm_qos_read_value(device, type):”h]”hŒ(s32 dev_pm_qos_read_value(device, type):”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´KvhjËubh÷)�”}”(hhh]”hÌ)�”}”(hŒCReturns the aggregated value for a given device's constraints list.”h]”hŒEReturns the aggregated value for a given device’s constraints list.”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KvhjÝubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjËubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´Kvhj;h²hubhá)�”}”(hXenum pm_qos_flags_status dev_pm_qos_flags(device, mask) Check PM QoS flags of the given device against the given mask of flags. The meaning of the return values is as follows: PM_QOS_FLAGS_ALL: All flags from the mask are set PM_QOS_FLAGS_SOME: Some flags from the mask are set PM_QOS_FLAGS_NONE: No flags from the mask are set PM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been initialized or the list of requests is empty. ”h]”(hç)�”}”(hŒ7enum pm_qos_flags_status dev_pm_qos_flags(device, mask)”h]”hŒ7enum pm_qos_flags_status dev_pm_qos_flags(device, mask)”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K„hjúubh÷)�”}”(hhh]”(hÌ)�”}”(hŒwCheck PM QoS flags of the given device against the given mask of flags. The meaning of the return values is as follows:”h]”hŒwCheck PM QoS flags of the given device against the given mask of flags. The meaning of the return values is as follows:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kyhj ubhŒ block_quote”“”)�”}”(hX1PM_QOS_FLAGS_ALL: All flags from the mask are set PM_QOS_FLAGS_SOME: Some flags from the mask are set PM_QOS_FLAGS_NONE: No flags from the mask are set PM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been initialized or the list of requests is empty. ”h]”hÜ)�”}”(hhh]”(há)�”}”(hŒ1PM_QOS_FLAGS_ALL: All flags from the mask are set”h]”(hç)�”}”(hŒPM_QOS_FLAGS_ALL:”h]”hŒPM_QOS_FLAGS_ALL:”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K|hj&ubh÷)�”}”(hhh]”hÌ)�”}”(hŒAll flags from the mask are set”h]”hŒAll flags from the mask are set”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K}hj8ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj&ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K|hj#ubhá)�”}”(hŒ3PM_QOS_FLAGS_SOME: Some flags from the mask are set”h]”(hç)�”}”(hŒPM_QOS_FLAGS_SOME:”h]”hŒPM_QOS_FLAGS_SOME:”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K~hjUubh÷)�”}”(hhh]”hÌ)�”}”(hŒ Some flags from the mask are set”h]”hŒ Some flags from the mask are set”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjgubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjUubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K~hj#ubhá)�”}”(hŒ1PM_QOS_FLAGS_NONE: No flags from the mask are set”h]”(hç)�”}”(hŒPM_QOS_FLAGS_NONE:”h]”hŒPM_QOS_FLAGS_NONE:”…”�”}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K€hj„ubh÷)�”}”(hhh]”hÌ)�”}”(hŒNo flags from the mask are set”h]”hŒNo flags from the mask are set”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K�hj–ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj„ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K€hj#ubhá)�”}”(hŒqPM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been initialized or the list of requests is empty. ”h]”(hç)�”}”(hŒPM_QOS_FLAGS_UNDEFINED:”h]”hŒPM_QOS_FLAGS_UNDEFINED:”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K„hj³ubh÷)�”}”(hhh]”hÌ)�”}”(hŒXThe device's PM QoS structure has not been initialized or the list of requests is empty.”h]”hŒZThe device’s PM QoS structure has not been initialized or the list of requests is empty.”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KƒhjÅubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj³ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K„hj#ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K|hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1höhjúubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K„hj;h²hubhá)�”}”(hXGint dev_pm_qos_add_ancestor_request(dev, handle, type, value) Add a PM QoS request for the first direct ancestor of the given device whose power.ignore_children flag is unset (for DEV_PM_QOS_RESUME_LATENCY requests) or whose power.set_latency_tolerance callback pointer is not NULL (for DEV_PM_QOS_LATENCY_TOLERANCE requests). ”h]”(hç)�”}”(hŒ=int dev_pm_qos_add_ancestor_request(dev, handle, type, value)”h]”hŒ=int dev_pm_qos_add_ancestor_request(dev, handle, type, value)”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´KŠhjúubh÷)�”}”(hhh]”hÌ)�”}”(hXAdd a PM QoS request for the first direct ancestor of the given device whose power.ignore_children flag is unset (for DEV_PM_QOS_RESUME_LATENCY requests) or whose power.set_latency_tolerance callback pointer is not NULL (for DEV_PM_QOS_LATENCY_TOLERANCE requests).”h]”hXAdd a PM QoS request for the first direct ancestor of the given device whose power.ignore_children flag is unset (for DEV_PM_QOS_RESUME_LATENCY requests) or whose power.set_latency_tolerance callback pointer is not NULL (for DEV_PM_QOS_LATENCY_TOLERANCE requests).”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‡hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjúubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´KŠhj;h²hubhá)�”}”(hXint dev_pm_qos_expose_latency_limit(device, value) Add a request to the device's PM QoS list of resume latency constraints and create a sysfs attribute pm_qos_resume_latency_us under the device's power directory allowing user space to manipulate that request. ”h]”(hç)�”}”(hŒ2int dev_pm_qos_expose_latency_limit(device, value)”h]”hŒ2int dev_pm_qos_expose_latency_limit(device, value)”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K�hj)ubh÷)�”}”(hhh]”hÌ)�”}”(hŒÐAdd a request to the device's PM QoS list of resume latency constraints and create a sysfs attribute pm_qos_resume_latency_us under the device's power directory allowing user space to manipulate that request.”h]”hŒÔAdd a request to the device’s PM QoS list of resume latency constraints and create a sysfs attribute pm_qos_resume_latency_us under the device’s power directory allowing user space to manipulate that request.”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K�hj;ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj)ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K�hj;h²hubhá)�”}”(hŒúvoid dev_pm_qos_hide_latency_limit(device) Drop the request added by dev_pm_qos_expose_latency_limit() from the device's PM QoS list of resume latency constraints and remove sysfs attribute pm_qos_resume_latency_us from the device's power directory. ”h]”(hç)�”}”(hŒ*void dev_pm_qos_hide_latency_limit(device)”h]”hŒ*void dev_pm_qos_hide_latency_limit(device)”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K”hjXubh÷)�”}”(hhh]”hÌ)�”}”(hŒÎDrop the request added by dev_pm_qos_expose_latency_limit() from the device's PM QoS list of resume latency constraints and remove sysfs attribute pm_qos_resume_latency_us from the device's power directory.”h]”hŒÒDrop the request added by dev_pm_qos_expose_latency_limit() from the device’s PM QoS list of resume latency constraints and remove sysfs attribute pm_qos_resume_latency_us from the device’s power directory.”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K’hjjubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjXubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K”hj;h²hubhá)�”}”(hŒþint dev_pm_qos_expose_flags(device, value) Add a request to the device's PM QoS list of flags and create sysfs attribute pm_qos_no_power_off under the device's power directory allowing user space to change the value of the PM_QOS_FLAG_NO_POWER_OFF flag. ”h]”(hç)�”}”(hŒ*int dev_pm_qos_expose_flags(device, value)”h]”hŒ*int dev_pm_qos_expose_flags(device, value)”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K™hj‡ubh÷)�”}”(hhh]”hÌ)�”}”(hŒÒAdd a request to the device's PM QoS list of flags and create sysfs attribute pm_qos_no_power_off under the device's power directory allowing user space to change the value of the PM_QOS_FLAG_NO_POWER_OFF flag.”h]”hŒÖAdd a request to the device’s PM QoS list of flags and create sysfs attribute pm_qos_no_power_off under the device’s power directory allowing user space to change the value of the PM_QOS_FLAG_NO_POWER_OFF flag.”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K—hj™ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj‡ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K™hj;h²hubhá)�”}”(hŒÐvoid dev_pm_qos_hide_flags(device) Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list of flags and remove sysfs attribute pm_qos_no_power_off from the device's power directory. ”h]”(hç)�”}”(hŒ"void dev_pm_qos_hide_flags(device)”h]”hŒ"void dev_pm_qos_hide_flags(device)”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´Kžhj¶ubh÷)�”}”(hhh]”hÌ)�”}”(hŒ¬Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list of flags and remove sysfs attribute pm_qos_no_power_off from the device's power directory.”h]”hŒ°Drop the request added by dev_pm_qos_expose_flags() from the device’s PM QoS list of flags and remove sysfs attribute pm_qos_no_power_off from the device’s power directory.”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KœhjÈubah}”(h]”h ]”h"]”h$]”h&]”uh1höhj¶ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´Kžhj;h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjòh²hh³hÊh´NubhÌ)�”}”(hŒNotification mechanisms:”h]”hŒNotification mechanisms:”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hjòh²hubhÌ)�”}”(hŒCThe per-device PM QoS framework has a per-device notification tree.”h]”hŒCThe per-device PM QoS framework has a per-device notification tree.”…”�”}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¢hjòh²hubhÜ)�”}”(hhh]”(há)�”}”(hŒæint dev_pm_qos_add_notifier(device, notifier, type): Adds a notification callback function for the device for a particular request type. The callback is called when the aggregated value of the device constraints list is changed. ”h]”(hç)�”}”(hŒ4int dev_pm_qos_add_notifier(device, notifier, type):”h]”hŒ4int dev_pm_qos_add_notifier(device, notifier, type):”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K©hj ubh÷)�”}”(hhh]”(hÌ)�”}”(hŒSAdds a notification callback function for the device for a particular request type.”h]”hŒSAdds a notification callback function for the device for a particular request type.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¥hjubhÌ)�”}”(hŒ[The callback is called when the aggregated value of the device constraints list is changed.”h]”hŒ[The callback is called when the aggregated value of the device constraints list is changed.”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¨hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1höhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K©hjubhá)�”}”(hŒtint dev_pm_qos_remove_notifier(device, notifier, type): Removes the notification callback function for the device. ”h]”(hç)�”}”(hŒ7int dev_pm_qos_remove_notifier(device, notifier, type):”h]”hŒ7int dev_pm_qos_remove_notifier(device, notifier, type):”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hæh³hÊh´K­hjGubh÷)�”}”(hhh]”hÌ)�”}”(hŒ:Removes the notification callback function for the device.”h]”hŒ:Removes the notification callback function for the device.”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¬hjYubah}”(h]”h ]”h"]”h$]”h&]”uh1höhjGubeh}”(h]”h ]”h"]”h$]”h&]”uh1hàh³hÊh´K­hjh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjòh²hh³hÊh´Nubh¶)�”}”(hhh]”(h»)�”}”(hŒActive state latency tolerance”h]”hŒActive state latency tolerance”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj|h²hh³hÊh´K°ubhÌ)�”}”(hX€This device PM QoS type is used to support systems in which hardware may switch to energy-saving operation modes on the fly. In those systems, if the operation mode chosen by the hardware attempts to save energy in an overly aggressive way, it may cause excess latencies to be visible to software, causing it to miss certain protocol requirements or target frame or sample rates etc.”h]”hX€This device PM QoS type is used to support systems in which hardware may switch to energy-saving operation modes on the fly. In those systems, if the operation mode chosen by the hardware attempts to save energy in an overly aggressive way, it may cause excess latencies to be visible to software, causing it to miss certain protocol requirements or target frame or sample rates etc.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K²hj|h²hubhÌ)�”}”(hX@If there is a latency tolerance control mechanism for a given device available to software, the .set_latency_tolerance callback in that device's dev_pm_info structure should be populated. The routine pointed to by it is should implement whatever is necessary to transfer the effective requirement value to the hardware.”h]”hXBIf there is a latency tolerance control mechanism for a given device available to software, the .set_latency_tolerance callback in that device’s dev_pm_info structure should be populated. The routine pointed to by it is should implement whatever is necessary to transfer the effective requirement value to the hardware.”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¸hj|h²hubhÌ)�”}”(hX5Whenever the effective latency tolerance changes for the device, its .set_latency_tolerance() callback will be executed and the effective value will be passed to it. If that value is negative, which means that the list of latency tolerance requirements for the device is empty, the callback is expected to switch the underlying hardware latency tolerance control mechanism to an autonomous mode if available. If that value is PM_QOS_LATENCY_ANY, in turn, and the hardware supports a special "no requirement" setting, the callback is expected to use it. That allows software to prevent the hardware from automatically updating the device's latency tolerance in response to its power state changes (e.g. during transitions from D3cold to D0), which generally may be done in the autonomous latency tolerance control mode.”h]”hX;Whenever the effective latency tolerance changes for the device, its .set_latency_tolerance() callback will be executed and the effective value will be passed to it. If that value is negative, which means that the list of latency tolerance requirements for the device is empty, the callback is expected to switch the underlying hardware latency tolerance control mechanism to an autonomous mode if available. If that value is PM_QOS_LATENCY_ANY, in turn, and the hardware supports a special “no requirementâ€� setting, the callback is expected to use it. That allows software to prevent the hardware from automatically updating the device’s latency tolerance in response to its power state changes (e.g. during transitions from D3cold to D0), which generally may be done in the autonomous latency tolerance control mode.”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¾hj|h²hubhÌ)�”}”(hXIf .set_latency_tolerance() is present for the device, sysfs attribute pm_qos_latency_tolerance_us will be present in the devivce's power directory. Then, user space can use that attribute to specify its latency tolerance requirement for the device, if any. Writing "any" to it means "no requirement, but do not let the hardware control latency tolerance" and writing "auto" to it allows the hardware to be switched to the autonomous mode if there are no other requirements from the kernel side in the device's list.”h]”hXIf .set_latency_tolerance() is present for the device, sysfs attribute pm_qos_latency_tolerance_us will be present in the devivce’s power directory. Then, user space can use that attribute to specify its latency tolerance requirement for the device, if any. Writing “anyâ€� to it means “no requirement, but do not let the hardware control latency toleranceâ€� and writing “autoâ€� to it allows the hardware to be switched to the autonomous mode if there are no other requirements from the kernel side in the device’s list.”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÊhj|h²hubhÌ)�”}”(hŒ¶Kernel code can use the functions described above along with the DEV_PM_QOS_LATENCY_TOLERANCE device PM QoS type to add, remove and update latency tolerance requirements for devices.”h]”hŒ¶Kernel code can use the functions described above along with the DEV_PM_QOS_LATENCY_TOLERANCE device PM QoS type to add, remove and update latency tolerance requirements for devices.”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÒhj|h²hubeh}”(h]”Œactive-state-latency-tolerance”ah ]”h"]”Œactive state latency tolerance”ah$]”h&]”uh1hµhjòh²hh³hÊh´K°ubeh}”(h]”Œ-pm-qos-per-device-latency-and-flags-framework”ah ]”h"]”Œ02. pm qos per-device latency and flags framework”ah$]”h&]”uh1hµhh·h²hh³hÊh´KRubeh}”(h]”Œpm-quality-of-service-interface”ah ]”h"]”Œpm quality of service interface”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”}”(jèjåjïjìjàjÝjØjÕuŒ nametypes”}”(jè‰jï‰jà‰j؉uh}”(jåh·jìjYjÝjòjÕj|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.