Blame SPECS/stalld.spec

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