Blame SPECS/stalld.spec

b1af9a
Name:		stalld
525e31
Version:	1.17.1
b1af9a
Release:	1%{?dist}
b1af9a
Summary:	Daemon that finds starving tasks and gives them a temporary boost
b1af9a
b1af9a
License:	GPLv2
b1af9a
URL:		https://gitlab.com/rt-linux-tools/%{name}/%{name}.git
525e31
Source0:	https://gitlab.com/rt-linux-tools/%{name}/-/archive/v%{version}/%{name}-%{version}.tar.bz2
b1af9a
b1af9a
BuildRequires:	glibc-devel
b1af9a
BuildRequires:	gcc
b1af9a
BuildRequires:	make
b1af9a
BuildRequires:	systemd-rpm-macros
b1af9a
b1af9a
Requires:	systemd
b1af9a
b1af9a
%description
b1af9a
The stalld program monitors the set of system threads,
b1af9a
looking for threads that are ready-to-run but have not
b1af9a
been given processor time for some threshold period.
b1af9a
When a starving thread is found, it is given a temporary
b1af9a
boost using the SCHED_DEADLINE policy. The default is to
b1af9a
allow 10 microseconds of runtime for 1 second of clock time.
b1af9a
b1af9a
%prep
b1af9a
%autosetup
b1af9a
b1af9a
%build
b1af9a
%make_build CFLAGS="%{optflags} %{build_cflags} -DVERSION="\\\"%{version}\\\"""  LDFLAGS="%{build_ldflags}"
b1af9a
b1af9a
%install
b1af9a
%make_install DOCDIR=%{_docdir} MANDIR=%{_mandir} BINDIR=%{_bindir} DATADIR=%{_datadir} VERSION=%{version}
b1af9a
%make_install -C redhat UNITDIR=%{_unitdir}
b1af9a
b1af9a
%files
b1af9a
%{_bindir}/%{name}
b1af9a
%{_bindir}/throttlectl
b1af9a
%{_unitdir}/%{name}.service
b1af9a
%config(noreplace) %{_sysconfdir}/sysconfig/stalld
b1af9a
%doc %{_docdir}/README.md
b1af9a
%doc %{_mandir}/man8/stalld.8*
b1af9a
%license gpl-2.0.txt
b1af9a
b1af9a
%post
b1af9a
%systemd_post %{name}.service
b1af9a
b1af9a
%preun
b1af9a
%systemd_preun %{name}.service
b1af9a
b1af9a
%postun
b1af9a
%systemd_postun_with_restart %{name}.service
b1af9a
b1af9a
%changelog
525e31
* Fri Oct 21 2022 Leah Leshchinsky <lleshchi@redhat.com> - 1.17.1-1
525e31
- stalld: Fix memory leak in print_boosted_info()
525e31
- utils: Check if the system is in lockdown mode
525e31
- stalld: print process comm and cpu when boosting
525e31
Resolves: rhbz#2136572
525e31
5ab0e8
* Thu Jul 14 2022 John Kacur <jkacur@redhat.com> - 1.17-1
5ab0e8
- rebase to upstream v1.17
5ab0e8
Resolves:rhbz#2107275
5ab0e8
5ab0e8
* Thu Mar 31 2022 Fernando Pacheco <fpacheco@redhat.com> - 1.16-1
5ab0e8
- stald/utils: Space, lines and voids clenaups
5ab0e8
- stalld: Add an option to easily set stalld as SCHED_DEADLINE
5ab0e8
- stalld: Comments cleanup
5ab0e8
- src/utils: Comments cleanup
5ab0e8
- src/throttling: Comments cleanup
5ab0e8
- src/stalld.h Comments cleanup
5ab0e8
  Resolves: rhbz#2068550
5ab0e8
b1af9a
* Mon Nov 15 2021 Fernando Pacheco <fpacheco@redhat.com> - 1.15-1
b1af9a
- stalld: Fix incorrect open() return value checks
b1af9a
- stalld: Pass errno to strerror() on sig*set() failures
b1af9a
- throttling: Always null terminate sched_rt_runtime_us output
b1af9a
- stalld: Remove unreachable statement in detect_task_format()
b1af9a
- tests: Fix uninitialized value action.sa_mask
b1af9a
- utils: Bail if malloc() returns null in parse_cpu_list()
b1af9a
- stalld: Use correct format specifier for long types
b1af9a
  Resolves: rhbz#2016010
b1af9a
b1af9a
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.14.1-2
b1af9a
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
b1af9a
  Related: rhbz#1991688
b1af9a
b1af9a
* Mon Jul 19 2021 Fernando Pacheco <fpacheco@redhat.com> - 1.14.1-1
b1af9a
- stalld: Coding style cleanup
b1af9a
- stalld: spaces in place of <TAB>
b1af9a
- throttling: Use RT_RUNTIME_PATH in rt_throttling_is_off()
b1af9a
- throttling: Check open() on turn_off_rt_throttling
b1af9a
- throttling: Adjust variables in restore_rt_throttling()
b1af9a
- stalld.c: utils.c: Remove complex assignments from variable declarations
b1af9a
- stalld.h: Define MAX_PATH/DIR_PATH/FILE_NAME and use them
b1af9a
- stalld: Adjust variables in parse_old_task_format()
b1af9a
- utils.c: Use MAX_PATH for pidfile
b1af9a
- stalld.c: Remove variable declaration from the middle of  the function
b1af9a
- stalld: Respect -l option in single threaded mode (1983103)
b1af9a
- utils: s/try_to_open_file/check_file_exists/
b1af9a
- utils: use check_file_exists in setup_hr_tick()
b1af9a
- utils: Check for the new sched_features path
b1af9a
b1af9a
* Fri Jul 02 2021 Fernando Pacheco <fpacheco@redhat.com> - 1.13-1
b1af9a
- stalld: Fix log message on boost_cpu_starving_vector()
b1af9a
- stalld: Add the overload control to the single-threaded mode
b1af9a
- stalld: Add the adaptive mode option
b1af9a
- stalld: Use the last mode set in the cmdline
b1af9a
- stalld: Fallback to the adaptive mode if force_fifo is selected
b1af9a
- stalld: Make single-threaded mode the default one
b1af9a
- stalld.service: Always restart stalld on exit
b1af9a
- utils.c: Fail if user is not root
b1af9a
- utils.c: Make the path to sched_debug path dynamic
b1af9a
b1af9a
* Tue Jun 29 2021 Fernando Pacheco <fpacheco@redhat.com> - 1.12-1
b1af9a
- stalld.8: fix diff cruft left in manpage source
b1af9a
- stalld.c: clean up handling of nr_running
b1af9a
- stalld.c: remove duplicate parameter to fill_waiting_task()
b1af9a
- stalld: Add error handling in get_cpu_idle_time()
b1af9a
- stalld.service: Run stalld as sched_fifo via systemd
b1af9a
- packaging: clean up Makefiles and rpm specfile
b1af9a
- stalld: Always print current function for info messages
b1af9a
- stalld: Always print current function for warn messages
b1af9a
- stalld: Always print current function for die messages
b1af9a
- utils: change PATHMAX to 4096
b1af9a
b1af9a
* Thu May 13 2021 Clark Williams <williams@redhat.com> - 1.11-1
b1af9a
- redhat/stalld.spec: pick up gating test version for changelog
b1af9a
- utils.c: set daemon umask to restrict global write/execute (1934586)
b1af9a
- hardening fixes from coverity scan (1934590)
b1af9a
b1af9a
* Tue Apr 27 2021 Clark Williams <williams@redhat.com> - 1.10-1
b1af9a
- utils: Fix bounds check on cpu and end_cpu variables
b1af9a
- stalld: Support denylisting of tasks in stalld
b1af9a
- src/utils: use right argument for warning printf
b1af9a
b1af9a
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.9-2
b1af9a
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
b1af9a
b1af9a
* Wed Feb 17 2021 Clark Williams <williams@redhat.com> - 1.9-2
b1af9a
- update to pick up latest gating test
b1af9a
b1af9a
* Wed Feb 17 2021 Clark Williams <williams@redhat.com> - 1.9-1
b1af9a
- Set starvation threshold default to 30 seconds
b1af9a
- rework read buffer allocation to properly find page size
b1af9a
- Add the -g/--granularity option
b1af9a
- Change the default granularity to five seconds
b1af9a
- Implement idle detection
b1af9a
- Implement the single-threaded mode
b1af9a
- Add HRTICK_DL support
b1af9a
b1af9a
* Fri Feb  5 2021 Clark Williams <williams@redhat.com> - 1.8-1
b1af9a
- Fix Readiness Protocol Mismatch with systemd
b1af9a
- test01:  update to use buildin atomic operations
b1af9a
- test01: add throttling check
b1af9a
b1af9a
* Tue Feb  2 2021 Clark Williams <williams@redhat.com> - 1.7-1
b1af9a
- rework detect_task_format and buffer_size logic
b1af9a
- make CFLAGS for local compile match rpmbuild CFLAGS
b1af9a
b1af9a
* Tue Jan 26 2021 Clark Williams <williams@redhat.com> - 1.6-1
b1af9a
- add systemd handling of RT Throttling
b1af9a
b1af9a
* Wed Jan 20 2021 Clark Williams <williams@redhat.com> - 1.5-1
b1af9a
- fix signal handler to catch SIGTERM
b1af9a
b1af9a
* Fri Dec 11 2020 Clark Williams <williams@redhat.com> - 1.4-1
b1af9a
- stalld: Set rt_runtime to -1 before trying the SCHED_DEADLINE
b1af9a
- Fix incorrect recursion of specfile version field
b1af9a
b1af9a
* Fri Nov 20 2020 Clark Williams <williams@redhat.com> - 1.3-1
b1af9a
- Readme: Add information about repositories
b1af9a
- Add version management and version option
b1af9a
- create doc and scripts directory and add info on releases
b1af9a
b1af9a
* Mon Nov  2 2020 Clark Williams <williams@redhat.com> - 1.2-1
b1af9a
- utils.c: added info() functions
b1af9a
- detect and correctly parse old-style /proc/sched_debug
b1af9a
- src/stalld: Fix an retval check while reading sched_debug
b1af9a
- src/throttling: Fix a compilation warning
b1af9a
- ensure we only count task lines in old-format sched_debug info
b1af9a
- Add comments, clean up trailing whitespace
b1af9a
- src/utils: Fix runtime parameters check
b1af9a
- stalld: Do not take actions if log_only is set
b1af9a
- remove warning from parse_old_task_format
b1af9a
b1af9a
* Tue Oct 27 2020 Clark Williams <williams@redhat.com> - 1.1-1
b1af9a
- Fix an option in README.md; consistency in user facing docs.
b1af9a
- Makefile: add 'static' target to link stalld statically
b1af9a
- gitignore: ignore object files and the stalld executable
b1af9a
- use FIFO for boosting (v3)
b1af9a
- stalld.c: fix sched_debug parsing and modify waiting task parsing
b1af9a
- redhat:  update release for features and bugfix
b1af9a
- stalld: Do not die if sched_debug returns an invalid value
b1af9a
- src/stalld: Do not die if the comm is too large
b1af9a
- src/stalld: Do not die if cannot write a message to the log
b1af9a
- src/stalld: Do not die if the main runs while a thread is monitoring the CPU
b1af9a
- implement RT throttling management and refactor source files
b1af9a
- more refactoring
b1af9a
- src/stalld: Reuse already read nr_running nr_rt_running
b1af9a
- src/stalld: Gracefully handle CPUs not found on sched_debug
b1af9a
- src/stalld: Use dynamically allocated memory to read sched_debug
b1af9a
- src/utils: Die with a divizion by zero if verbose
b1af9a
- src/stalld: Add config_buffer_size variable
b1af9a
- src/stalld: Increase the sched_debug read buffer if it gets too small
b1af9a
- src/stalld: Fix an retval check while reading sched_debug
b1af9a
- src/throttling: Fix a compilation warning
b1af9a
b1af9a
* Sun Oct  4 2020 Clark Williams <williams@redhat.com> - 1.0-4
b1af9a
- Fix an option in README.md; consistency in user facing docs.
b1af9a
- gitignore: ignore object files and the stalld executable
b1af9a
- Makefile: add 'static' target to link stalld statically
b1af9a
- use FIFO for boosting (v3)
b1af9a
- stalld: update usage message to include --force_fifo/-F option
b1af9a
- stalld.c: fix sched_debug parsing and modify waiting task parsing
b1af9a
b1af9a
* Tue Sep  1 2020 Clark Williams <williams@redhat.com> - 1.0-3
b1af9a
- Place BuildRequires on individual lines
b1af9a
- Fix changelog notations
b1af9a
- Modify build command to pass in CFLAGS and LDFLAGS
b1af9a
- fix compiler warnings in stalld.c
b1af9a
b1af9a
* Mon Aug 31 2020 Clark Williams <williams@redhat.com> - 1.0-2
b1af9a
- use _docdir macro for README.md
b1af9a
- use _mandir macro for stalld.8 manpage
b1af9a
- use tabs for spacing
b1af9a
- added push Makefile target to copy latest to upstream URL
b1af9a
b1af9a
* Tue Aug 25 2020 Clark Williams <williams@redhat.com> - 1.0-1
b1af9a
- rename project to stalld
b1af9a
- set version to 1.0
b1af9a
- clean up rpmlint complaints
b1af9a
b1af9a
* Fri Aug 21 2020 Clark Williams <williams@redhat.com> - 0.2-1
b1af9a
- add pidfile logic
b1af9a
b1af9a
* Thu Aug 20 2020 Clark Williams <williams@redhat.com> - 0.1-1
b1af9a
- Added systemd service to redhat subdirectory
b1af9a
- added make and rpm logic for systemd files
b1af9a
b1af9a
* Wed Aug 19 2020 Clark Williams <williams@redhat.com> - 0.0-1
b1af9a
- initial version of specfile
b1af9a
- Makefile mods for RPM builds
b1af9a
- added systemd service and config files