config/pm-qos-mgr/centos/pm-qos-mgr.spec
Jim Gauld 76b1a7a16f Introduce PM QoS cpu latency manager for kubelet
This creates a daemon 'pm-qos-mgr' that monitors kubelet cpu-manager
static cpu assignments and modifies PM QoS CPU wakeup latency to
govern the C-states per CPU.

Guaranteed pods with exclusive CPUs get "low" cpu wakeup latency
policy (the c-state is capped at C1).

Remaining pods (i.e., with default CPUs) get "high" cpu wakeup latency
policy, so the cpu may go into higher c-state if idle.

Change-Id: I8470217dc53b6a7912b5023d8c0b04d966357222
Closes-Bug: 1830545
Signed-off-by: Jim Gauld <james.gauld@windriver.com>
2019-05-28 22:53:16 -04:00

62 lines
1.4 KiB
RPMSpec

%define debug_package %{nil}
%global pypi_name pm_qos_mgr
Name: pm-qos-mgr
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: PM QoS CPU wakeup latency manager for kubelet cpu-manager
License: Apache-2.0
Group: base
URL: unknown
Source0: %{name}-%{version}.tar.gz
BuildRequires: git
BuildRequires: python-pbr >= 2.0.0
BuildRequires: python-setuptools
BuildRequires: python2-pip
BuildRequires: systemd-devel
Requires: python-pbr >= 2.0.0
Requires: python-inotify
Requires: systemd
%description
A daemon that monitors kubelet cpu-manager static cpu assignments
and modifies PM QoS CPU wakeup latency.
%define pythonroot %{_libdir}/python2.7/site-packages
%prep
%autosetup -n %{name}-%{version} -S git
# Remove bundled egg-info
rm -rf *.egg-info
%build
export PBR_VERSION=%{version}
%{__python} setup.py build
%install
export PBR_VERSION=%{version}
%{__python} setup.py install --root=%{buildroot} \
--install-lib=%{pythonroot} \
--prefix=%{_prefix} \
--install-data=%{_datadir} \
--single-version-externally-managed
install -p -D -m 664 pm-qos-mgr.service %{buildroot}%{_unitdir}/pm-qos-mgr.service
%post
systemctl enable pm-qos-mgr.service
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE
%{_bindir}/*
%{pythonroot}/%{pypi_name}/*
%{pythonroot}/%{pypi_name}-%{version}*.egg-info
%{_unitdir}/*