|
|
66e938 |
# Copyright (c) 2016-2019, Intel Corporation
|
|
|
66e938 |
#
|
|
|
66e938 |
# Redistribution and use in source and binary forms, with or without
|
|
|
66e938 |
# modification, are permitted provided that the following conditions are met:
|
|
|
66e938 |
#
|
|
|
66e938 |
# * Redistributions of source code must retain the above copyright notice,
|
|
|
66e938 |
# this list of conditions and the following disclaimer.
|
|
|
66e938 |
# * Redistributions in binary form must reproduce the above copyright
|
|
|
66e938 |
# notice, this list of conditions and the following disclaimer in the
|
|
|
66e938 |
# documentation and/or other materials provided with the distribution.
|
|
|
66e938 |
# * Neither the name of Intel Corporation nor the names of its contributors
|
|
|
66e938 |
# may be used to endorse or promote products derived from this software
|
|
|
66e938 |
# without specific prior written permission.
|
|
|
66e938 |
#
|
|
|
66e938 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
66e938 |
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
66e938 |
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
66e938 |
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
|
66e938 |
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
66e938 |
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
66e938 |
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
66e938 |
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
66e938 |
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
66e938 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
66e938 |
|
|
|
66e938 |
%global githubname intel-cmt-cat
|
|
|
66e938 |
%global githubver 3.0.1
|
|
|
66e938 |
|
|
|
66e938 |
%if %{defined githubsubver}
|
|
|
66e938 |
%global githubfull %{githubname}-%{githubver}.%{githubsubver}
|
|
|
66e938 |
%else
|
|
|
66e938 |
%global githubfull %{githubname}-%{githubver}
|
|
|
66e938 |
%endif
|
|
|
66e938 |
|
|
|
66e938 |
# disable producing debuginfo for this package
|
|
|
66e938 |
%global debug_package %{nil}
|
|
|
66e938 |
|
|
|
66e938 |
|
|
|
66e938 |
Summary: Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies
|
|
|
66e938 |
Name: %{githubname}
|
|
|
66e938 |
Release: 1%{?dist}
|
|
|
66e938 |
Version: %{githubver}
|
|
|
66e938 |
License: BSD
|
|
|
66e938 |
ExclusiveArch: x86_64 i686 i586
|
|
|
66e938 |
%if %{defined githubsubver}
|
|
|
66e938 |
Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.%{githubsubver}.tar.gz
|
|
|
66e938 |
%else
|
|
|
66e938 |
Source: https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz
|
|
|
66e938 |
%endif
|
|
|
66e938 |
URL: https://github.com/01org/%{githubname}
|
|
|
66e938 |
BuildRequires: gcc, make
|
|
|
66e938 |
|
|
|
66e938 |
%description
|
|
|
66e938 |
This software package provides basic support for
|
|
|
66e938 |
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
|
|
|
66e938 |
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
|
|
|
66e938 |
and Code Data Prioratization (CDP).
|
|
|
66e938 |
|
|
|
66e938 |
CMT, MBM and CAT are configured using Model Specific Registers (MSRs)
|
|
|
66e938 |
to measure last level cache occupancy, set up the class of service masks and
|
|
|
66e938 |
manage the association of the cores/logical threads to a class of service.
|
|
|
66e938 |
The software executes in user space, and access to the MSRs is
|
|
|
66e938 |
obtained through a standard Linux* interface. The virtual file system
|
|
|
66e938 |
provides an interface to read and write the MSR registers but
|
|
|
66e938 |
it requires root privileges.
|
|
|
66e938 |
|
|
|
66e938 |
%package -n intel-cmt-cat-devel
|
|
|
66e938 |
Summary: Library and sample code to use CMT, MBM, CAT, CDP and MBA technologies
|
|
|
66e938 |
License: BSD
|
|
|
66e938 |
Requires: intel-cmt-cat == %{version}
|
|
|
66e938 |
ExclusiveArch: x86_64 i686 i586
|
|
|
66e938 |
|
|
|
66e938 |
%description -n intel-cmt-cat-devel
|
|
|
66e938 |
This software package provides basic support for
|
|
|
66e938 |
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
|
|
|
66e938 |
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
|
|
|
66e938 |
and Code Data Prioratization (CDP).
|
|
|
66e938 |
The package includes library, header file and sample code.
|
|
|
66e938 |
|
|
|
66e938 |
For additional information please refer to:
|
|
|
66e938 |
https://github.com/01org/%{githubname}
|
|
|
66e938 |
|
|
|
66e938 |
%prep
|
|
|
66e938 |
%autosetup -n %{githubfull}
|
|
|
66e938 |
|
|
|
66e938 |
%post -p /sbin/ldconfig
|
|
|
66e938 |
|
|
|
66e938 |
%postun -p /sbin/ldconfig
|
|
|
66e938 |
|
|
|
66e938 |
%build
|
|
|
66e938 |
make %{?_smp_mflags}
|
|
|
66e938 |
|
|
|
66e938 |
%install
|
|
|
66e938 |
# Not doing make install as it strips the symbols.
|
|
|
66e938 |
# Using files from the build directory.
|
|
|
66e938 |
install -d %{buildroot}/%{_bindir}
|
|
|
66e938 |
install -s %{_builddir}/%{githubfull}/pqos/pqos %{buildroot}/%{_bindir}
|
|
|
66e938 |
install %{_builddir}/%{githubfull}/pqos/pqos-os %{buildroot}/%{_bindir}
|
|
|
66e938 |
install %{_builddir}/%{githubfull}/pqos/pqos-msr %{buildroot}/%{_bindir}
|
|
|
66e938 |
sed -i "1s/.*/\#!\/usr\/bin\/bash/" %{buildroot}/%{_bindir}/pqos-*
|
|
|
66e938 |
|
|
|
66e938 |
install -d %{buildroot}/%{_mandir}/man8
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/pqos/pqos.8 %{buildroot}/%{_mandir}/man8
|
|
|
66e938 |
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-os.8
|
|
|
66e938 |
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-msr.8
|
|
|
66e938 |
|
|
|
66e938 |
install -d %{buildroot}/%{_bindir}
|
|
|
66e938 |
install -s %{_builddir}/%{githubfull}/rdtset/rdtset %{buildroot}/%{_bindir}
|
|
|
66e938 |
|
|
|
66e938 |
install -d %{buildroot}/%{_mandir}/man8
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/rdtset/rdtset.8 %{buildroot}/%{_mandir}/man8
|
|
|
66e938 |
|
|
|
66e938 |
install -d %{buildroot}/%{_licensedir}/%{name}-%{version}
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version}
|
|
|
66e938 |
|
|
|
66e938 |
# Install the library
|
|
|
66e938 |
install -d %{buildroot}/%{_libdir}
|
|
|
66e938 |
install -s %{_builddir}/%{githubfull}/lib/libpqos.so.* %{buildroot}/%{_libdir}
|
|
|
66e938 |
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so %{buildroot}/%{_libdir}
|
|
|
66e938 |
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so.3 %{buildroot}/%{_libdir}
|
|
|
66e938 |
|
|
|
66e938 |
# Install the header file
|
|
|
66e938 |
install -d %{buildroot}/%{_includedir}
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/lib/pqos.h %{buildroot}/%{_includedir}
|
|
|
66e938 |
|
|
|
66e938 |
# Install license and sample code
|
|
|
66e938 |
install -d %{buildroot}/%{_usrsrc}/%{githubfull}
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_usrsrc}/%{githubfull}
|
|
|
66e938 |
|
|
|
66e938 |
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c
|
|
|
66e938 |
|
|
|
66e938 |
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/reset_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l2cat.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l3cat.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_mba.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/association_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
|
|
|
66e938 |
|
|
|
66e938 |
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/Makefile %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
|
|
|
66e938 |
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/monitor_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
|
|
|
66e938 |
|
|
|
66e938 |
%files
|
|
|
66e938 |
%{_bindir}/pqos
|
|
|
66e938 |
%{_bindir}/pqos-os
|
|
|
66e938 |
%{_bindir}/pqos-msr
|
|
|
66e938 |
%{_mandir}/man8/pqos.8.gz
|
|
|
66e938 |
%{_mandir}/man8/pqos-os.8.gz
|
|
|
66e938 |
%{_mandir}/man8/pqos-msr.8.gz
|
|
|
66e938 |
%{_bindir}/rdtset
|
|
|
66e938 |
%{_mandir}/man8/rdtset.8.gz
|
|
|
66e938 |
%{_libdir}/libpqos.so.*
|
|
|
66e938 |
|
|
|
66e938 |
%{!?_licensedir:%global license %%doc}
|
|
|
66e938 |
%license %{_licensedir}/%{name}-%{version}/LICENSE
|
|
|
66e938 |
%doc ChangeLog README
|
|
|
66e938 |
|
|
|
66e938 |
%files -n intel-cmt-cat-devel
|
|
|
66e938 |
%{_libdir}/libpqos.so
|
|
|
66e938 |
%{_libdir}/libpqos.so.3
|
|
|
66e938 |
%{_includedir}/pqos.h
|
|
|
66e938 |
%{_usrsrc}/%{githubfull}/c/CAT_MBA/Makefile
|
|
|
66e938 |
%{_usrsrc}/%{githubfull}/c/CAT_MBA/reset_app.c
|
|
|
66e938 |
%{_usrsrc}/%{githubfull}/c/CAT_MBA/association_app.c
|
|
|
66e938 |
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l2cat.c
|
|
|
66e938 |
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l3cat.c
|
|
|
66e938 |
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_mba.c
|
|
|
66e938 |
%{_usrsrc}/%{githubfull}/c/CMT_MBM/Makefile
|
|
|
66e938 |
%{_usrsrc}/%{githubfull}/c/CMT_MBM/monitor_app.c
|
|
|
66e938 |
%doc %{_usrsrc}/%{githubfull}/LICENSE
|
|
|
66e938 |
|
|
|
66e938 |
%changelog
|
|
|
66e938 |
* Tue May 21 2019 Jiri Olsa <jolsa@redhat.com> 3.1.0-1
|
|
|
66e938 |
- new version 3.1.0
|
|
|
66e938 |
- change spec to follow fedora
|
|
|
66e938 |
- Resolves: rhbz#1643196
|
|
|
66e938 |
|
|
|
66e938 |
* Thu Nov 15 2018 Jiri Olsa <jolsa@redhat.com> 2.1.0-1
|
|
|
66e938 |
- new version 2.1.0
|
|
|
66e938 |
- change spec to follow fedora
|
|
|
66e938 |
- Resolves: rhbz#1643196
|
|
|
66e938 |
|
|
|
66e938 |
* Mon May 08 2017 Jiri Olsa <jolsa@redhat.com> 0.1.5-2
|
|
|
66e938 |
- new version 0.1.5-1
|
|
|
66e938 |
- change spec to follow fedora
|
|
|
66e938 |
- Resolves: rhbz#1448539
|
|
|
66e938 |
|
|
|
66e938 |
* Thu May 04 2017 Jiri Olsa <jolsa@redhat.com> 0.1.5-1
|
|
|
66e938 |
- Resolves: rhbz#1315489
|
|
|
66e938 |
|
|
|
66e938 |
* Thu Mar 30 2017 Jiri Olsa <jolsa@redhat.com> 0.1.4-5
|
|
|
66e938 |
- Resolves: rhbz#1315489
|
|
|
66e938 |
|
|
|
66e938 |
* Fri Feb 17 2017 Gopal Tiwari <gtiwari@redhat.com> 0.1.4-4
|
|
|
66e938 |
- Resolves: rhbz#1315489
|
|
|
66e938 |
|
|
|
66e938 |
* Tue Apr 19 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-3
|
|
|
66e938 |
- global typo fix
|
|
|
66e938 |
- small edits in the description
|
|
|
66e938 |
|
|
|
66e938 |
* Mon Apr 18 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-2
|
|
|
66e938 |
- LICENSE file added to the package
|
|
|
66e938 |
|
|
|
66e938 |
* Thu Apr 7 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-1
|
|
|
66e938 |
- initial version of the package
|