Blame SPECS/stalld.spec

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