csphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/power/pm_qos_interfacemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/power/pm_qos_interfacemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/power/pm_qos_interfacemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/power/pm_qos_interfacemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/power/pm_qos_interfacemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/power/pm_qos_interfacemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hPM Quality Of Service Interfaceh]hPM Quality Of Service Interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/power/pm_qos_interface.rsthKubh paragraph)}(hThis 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]hThis interface provides a kernel and user mode interface for registering performance expectations by drivers, subsystems and user space applications on one of the parameters.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhdefinition_list)}(hhh]hdefinition_list_item)}(hTwo 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](hterm)}(h.Two different PM QoS frameworks are available:h]h.Two different PM QoS frameworks are available:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubh definition)}(hhh]h bullet_list)}(hhh](h list_item)}(hCPU latency QoS.h]h)}(hhh]hCPU latency QoS.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hpThe per-device PM QoS framework provides the API to manage the per-device latency constraints and PM QoS flags. h]h)}(hoThe per-device PM QoS framework provides the API to manage the per-device latency constraints and PM QoS flags.h]hoThe per-device PM QoS framework provides the API to manage the per-device latency constraints and PM QoS flags.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]bullet*uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhNhNubh)}(hHThe latency unit used in the PM QoS framework is the microsecond (usec).h]hHThe latency unit used in the PM QoS framework is the microsecond (usec).}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h1. PM QoS frameworkh]h1. PM QoS framework}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhKubh)}(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.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEhhubh)}(hNote: the aggregated target value is implemented as an atomic variable so that reading the aggregated value does not require any locking mechanism.h]hNote: the aggregated target value is implemented as an atomic variable so that reading the aggregated value does not require any locking mechanism.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEhhubh)}(h6From kernel space the use of this interface is simple:h]h6From kernel space the use of this interface is simple:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEhhubh)}(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)}(h7void cpu_latency_qos_add_request(handle, target_value):h]h7void cpu_latency_qos_add_request(handle, target_value):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhK$hjubh)}(hvoid 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):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubh)}(hhh]h)}(hWill 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]hWill 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhK)hjhhubh)}(hvoid 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):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubh)}(hhh]h)}(hWill 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]hWill 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhK.hjhhubh)}(hSint cpu_latency_qos_limit(): Returns the aggregated value for the CPU latency QoS. h](h)}(hint cpu_latency_qos_limit():h]hint cpu_latency_qos_limit():}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubh)}(hhh]h)}(h5Returns the aggregated value for the CPU latency QoS.h]h5Returns the aggregated value for the CPU latency QoS.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hj"ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubh)}(hint 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):}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hj?ubh)}(hhh]h)}(hcReturns if the request is still active, i.e. it has not been removed from the CPU latency QoS list.h]hcReturns if the request is still active, i.e. it has not been removed from the CPU latency QoS list.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjQubah}(h]h ]h"]h$]h&]uh1hhj?ubeh}(h]h ]h"]h$]h&]uh1hhhhK5hjhhubh)}(hint cpu_latency_qos_add_notifier(notifier): Adds a notification callback function to the CPU latency QoS. The callback is called when the aggregated value for the CPU latency QoS is changed. h](h)}(h+int cpu_latency_qos_add_notifier(notifier):h]h+int cpu_latency_qos_add_notifier(notifier):}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjnubh)}(hhh]h)}(hAdds a notification callback function to the CPU latency QoS. The callback is called when the aggregated value for the CPU latency QoS is changed.h]hAdds a notification callback function to the CPU latency QoS. The callback is called when the aggregated value for the CPU latency QoS is changed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1hhjnubeh}(h]h ]h"]h$]h&]uh1hhhhK9hjhhubh)}(huint cpu_latency_qos_remove_notifier(notifier): Removes the notification callback function from the CPU latency QoS. h](h)}(h.int cpu_latency_qos_remove_notifier(notifier):h]h.int cpu_latency_qos_remove_notifier(notifier):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjubh)}(hhh]h)}(hDRemoves the notification callback function from the CPU latency QoS.h]hDRemoves the notification callback function from the CPU latency QoS.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK