← Back
Editing: plugin_uncore.cpython-312.opt-1.pyc
� �]�i� � � � d dl mZ d dl� ddlZddlmZ ddlZddlZej j � Z e� ZdZ dZd Z G d� dej � Zy) � )�hotplug)�*� N)�commandsz//sys/devices/system/cpu/intel_uncore_frequency/c �� � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z e d� � Zd � Zd � Z d� Z edd �� d� � Z ed� dd�� Z edd �� d� � Z ed� dd�� Zy)�UncorePlugina� An Intel-specific plug-in for limiting the maximum and minimum uncore frequency. The options [option]`max_freq_khz`, [option]`min_freq_khz` correspond to `sysfs` files exposed by Intel uncore frequency driver. Their values can be specified in kHz or as a percentage of their configurable range. .Limiting maximum uncore frequency ==== ---- [uncore10] type=uncore devices=uncore10 max_freq_khz=4000000 [uncore_all] type=uncore max_freq_khz=90% ---- Using this options *TuneD* will limit maximum frequency of all uncore units on the Intel system to 90% of the allowable range. Except uncore10 which maximum frequency limit will be set to 4 GHz. ==== c � � d| _ t � | _ t � | _ d| _ t j t � }t j |d� }t |� dkD r d| _ |}|D ] }| j j |� � t j dt | j � � y # t $ r Y y w xY w)NTFzuncore*r zdevices: %s)�_devices_supported�set�_assigned_devices� _free_devices�_is_tpmi�os�listdir� SYSFS_DIR�OSError�fnmatch�filter�len�add�log�debug�str)�self�devices�tpmi_devices�ds �@/usr/lib/python3.12/site-packages/tuned/plugins/plugin_uncore.py� _init_deviceszUncorePlugin._init_devices+ s� � � �$���5�$���u�$���$�-� � �Z�Z� � "�7� �����3�,�������4�=� �7��a������!�� � �)�)�M�3�t�1�1�2�3�� � � � �s �C � C�Cc � � d|_ d|_ y )NTF)�_has_static_tuning�_has_dynamic_tuning�r �instances r �_instance_initzUncorePlugin._instance_initA s � � $�(��!&�(�� c � � y )N� r# s r �_instance_cleanupzUncorePlugin._instance_cleanupE s � �r&