pub/scm/utils/stalld/stalld.git  about / heads / tags
daemon to detect stalled threads and temporarily boost for forward progress
$ git log --pretty=format:'%h %s (%cs)%d'
8710a48 Merge branch 'work' into 'master' (2020-11-06)
	(HEAD -> master, clrkwllms/new_sched_debug, clrkwllms/main)
a403eda Readme: Add information about repositories (2020-11-05)
4aaa57b Merge branch 'release1.2' into 'master' (2020-11-03)
	(tag: v1.2.0)
51924a9 version bump to 1.2 (2020-11-02)
b93d65d Merge branch 'fixes' into 'master' (2020-11-02)
45ebc44 Merge branch 'new_parsing' into 'master' (2020-11-02)
8be5b56 Merge branch 'new_parsing' of gitlab.com:clrkwllms/stalld into new_parsing (2020-11-02)
3501740 remove warning from parse_old_task_format (2020-11-02)
6823636 stalld: Do not take actions if log_only is set (2020-11-02)
61a9ae9 src/utils: Fix runtime parameters check (2020-11-02)
...

$ git cat-file blob HEAD:README.md
# stalld

The stalld program (which stands for 'stall daemon') is a
mechanism to prevent the *starvation* of operating system threads in a
Linux system. The premise is to start up on a *housekeeping* cpu (one
that is not used for real-application purposes) and to periodically
monitor the state of each thread in the system, looking for a thread
that has been on a run queue (i.e. ready to run) for a specifed length
of time without being run. This condition is usually hit when the
thread is on the same cpu as a high-priority cpu-intensive task and
therefore is being given no opportunity to run.

When a thread is judged to be starving, stalld changes
that thread to use the SCHED_DEADLINE policy and gives the thread a
small slice of time for that cpu (specified on the command line). The
thread then runs and when that timeslice is used, the thread is then
returned to its original scheduling policy and stalld then
continues to monitor thread states.

There is now an experimental option to boost using SCHED_FIFO. This
logic is used if the running kernel does not support the
SCHED_DEADLINE policy and may be forced by using the -F/--force_fifo
option.

## Command Line Options

`Usage: stalld [-l] [-v] [-k] [-s] [-f] [-h] [-F]
          [-c cpu-list]
          [-p time in ns] [-r time in ns]
          [-d time in seconds] [-t time in seconds]`

### Logging options
- -l/--log_only: only log information (do not boost) [false]
- -v/--verbose: print info to the std output [false]
- -k/--log_kmsg: print log to the kernel buffer [false]
- -s/--log_syslog: print log to syslog [true]

### Startup options
- -c/--cpu: list of cpus to monitor for stalled threads [all cpus]
- -f/--foreground: run in foreground [false but true when -v]
- -P/--pidfile: write daemon pid to specified file [no pidfile]

### Boosting options
- -p/--boost_period: SCHED_DEADLINE period [ns] that the starving task will receive [1000000000]
- -r/--boost_runtime: SCHED_DEADLINE runtime [ns] that the starving task will receive [20000]
- -d/--boost_duration: how long [s] the starving task will run with SCHED_DEADLINE [3]
- -F/--force_fifo: force using SCHED_FIFO for boosting

### Monitoring options
- -t/--starving_threshold: how long [s] the starving task will wait before being boosted [60]
- -A/--aggressive_mode: dispatch one thread per run queue, even when there is no starving
                          threads on all CPU (uses more CPU/power). [false]
### Miscellaneous
- -h/--help: print this menu

## Repositories
The repository at https://gitlab.com/rt-linux-tools/stalld is the main
repository, where the development takes place.

The repository at https://git.kernel.org/pub/scm/utils/stalld/stalld.git is the
distribution repository, where distros can pick the latest released version.

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
  main         stalld: v1.19.3 (2024-05-16)
  1_17_lt      stalld: v1.17.2 (2022-12-21)
  clrkwllms_main Merge branch 'docs_update' into 'main' (2020-11-20)
  docs_update  create doc and scripts directory and add info on releases (2020-11-19)
  version_option Add version management and version option (2020-11-17)
  clrkwllms/main Merge branch 'work' into 'master' (2020-11-06)
  clrkwllms/new_sched_debug Merge branch 'work' into 'master' (2020-11-06)
* master       Merge branch 'work' into 'master' (2020-11-06)
  new_parsing  ensure we only count task lines in old-format sched_debug info (2020-10-28)
  release1.1   stalld:  version bump to 1.1 (2020-10-27)
...

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v1.19.3      stalld: v1.19.3 (2024-05-16) tar.gz
v1.19.1      stalld: v1.19.1 (2024-02-09) tar.gz
v1.18.0      Merge branch '1.18_mr' into 'main' (2022-12-21) tar.gz
v1.17.2      stalld: v1.17.2 (2022-12-21) tar.gz
v1.17.1      Merge branch 'v1.7.1_send' into 'main' (2022-10-14) tar.gz
v1.7.1       stalld: v1.17.1 (2022-10-14) tar.gz
v1.17.0      Merge branch 'main_v1.17' into 'main' (2022-07-14) tar.gz
v1.16.0      stalld: v1.16 (2022-03-28) tar.gz
v1.15.0      stalld: v1.15 (2021-11-15) tar.gz
v1.14.2      Merge branch 'skip-offline' into 'main' (2021-08-12) tar.gz
...

# associated public inboxes:
# (number on the left is used for dev purposes)
          6 lkml
          5 u-boot
          3 qemu-devel
          3 netfilter-devel
          3 netdev
          3 git
          2 linux-wireless
          2 linux-nvme
          2 linux-nfs
          2 kvmarm
          2 driverdev-devel
          2 linux-gpio
          2 linux-rdma
          2 dpdk-dev
          2 linuxppc-dev
          2 util-linux
          2 linux-man
          2 linux-raid
          2 dm-devel
          2 linux-staging
          2 fio
          2 yocto-meta-ti
          2 poky
          1 linux-samsung-soc
          1 linux-fscrypt
          1 linux-mtd
          1 cocci
          1 linux-block
          1 linux-riscv
          1 linux-xfs
          1 live-patching
          1 bpf
          1 linux-mediatek
          1 linux-crypto
          1 linux-efi
          1 linux-acpi
          1 linux-integrity
          1 linux-fsdevel
          1 linux-edac
          1 linux-cifs
          1 linux-devicetree
          1 linux-arm-msm
          1 linux-amlogic
          1 linux-erofs
          1 linux-mm
          1 linux-nvdimm
          1 linux-iommu
          1 linux-media
          1 xen-devel
          1 stable
          1 linux-snps-arc
          1 linux-mips
          1 fstests
          1 linux-pm
          1 linux-hwmon
          1 linux-rtc
          1 linux-input
          1 alsa-devel
          1 linux-scsi
          1 linux-btrfs
          1 linux-arm-kernel
          1 linux-usb
          1 linux-renesas-soc
          1 linux-kselftest
          1 selinux
          1 kernel-hardening
          1 linux-clk
          1 linux-iio
          1 dmaengine
          1 linux-next
          1 linux-parisc
          1 linux-ext4
          1 linux-leds
          1 linux-security-module
          1 linux-pci
          1 linux-f2fs-devel
          1 kvm
          1 linux-modules
          1 kernelnewbies
          1 linux-rt-users
          1 linux-bluetooth
          1 linux-sgx
          1 linux-ide
          1 linux-serial
          1 linux-watchdog
          1 linux-trace-devel
          1 linux-hyperv
          1 workflows
          1 rcu
          1 linux-m68k
          1 linux-i3c
          1 linux-spdx
          1 linux-wpan
          1 ksummit-discuss
          1 wireguard
          1 backports
          1 io-uring
          1 linux-kernel-mentees
          1 linux-doc
          1 linux-csky
          1 linux-mmc
          1 amd-gfx
          1 dri-devel
          1 intel-gfx
          1 tpmdd-devel
          1 linux-unionfs
          1 linux-firmware
          1 linux-api
          1 cip-dev
          1 linux-omap
          1 linux-audit
          1 linux-spi
          1 linux-i2c
          1 linux-remoteproc
          1 linux-dash
          1 linux-bcache
          1 linux-sparse
          1 mm-commits
          1 linux-pwm
          1 linux-tegra
          1 lttng-dev
          1 virtualization
          1 linux-kbuild
          1 linux-fpga
          1 ceph-devel
          1 linux-arch
          1 linux-can
          1 containers
          1 linux-rockchip
          1 xdp-newbies
          1 platform-driver-x86
          1 phone-devel
          1 openbmc
          1 linux-hardening
          1 dash
          1 keyrings
          1 linux-fbdev
          1 linux-sctp
          1 linux-cxl
          1 linux-perf-users
          1 target-devel
          1 lustre-devel
          1 linux-sh
          1 soc
          1 ocfs2-devel
          1 rust-for-linux
          1 ath10k
          1 ath11k
          1 nouveau
          1 linux-phy
          1 linux-s390
          1 kernel-janitors
          1 sparclinux
          1 linux-sunxi
          1 mptcp
          1 linux-coco
          1 regressions
          1 ksummit
          1 b43-dev
          1 nvdimm
          1 linux-nfc
          1 linux-bcachefs
          1 ath9k-devel
          1 buildroot
          1 ntfs3
          1 llvm
          1 iwd
          1 ell
          1 ofono
          1 ltp
          1 yocto
          1 yocto-meta-freescale
          1 openembedded-core
          1 yocto-toaster
          1 yocto-meta-arm
          1 yocto-docs
          1 openembedded-devel
          1 bitbake-devel
          1 linux-patches
          1 yocto-meta-virtualization
          1 chrome-platform
          1 ntb
          1 yocto-meta-arago
          1 outreachy
          1 xenomai
          1 damon
          1 asahi
          1 openrisc
          1 intel-wired-lan
          1 kexec
          1 loongarch
          1 imx
          1 ath12k
          1 b4-sent
          1 linux-trace-kernel
          1 oe-linux-nfc
          1 oe-kbuild-all
          1 oe-chipsec
          1 batman
          1 intel-xe
          1 linux-um
          1 virtio-dev
          1 virtio-comment
          1 v9fs
          1 ecryptfs
          1 qemu-riscv
          1 linux-ia64
          1 cluster-devel
          1 grub-devel
          1 kbd
          1 autofs
          1 cpufreq
          1 dccp
          1 cgroups
          1 devicetree-spec
          1 devicetree-compiler
          1 initramfs
          1 kvm-ppc
          1 hail-devel
          1 kvm-ia64
          1 linux-8086
          1 kernel-testers
          1 linux-alpha
          1 linux-btrace
          1 linux-embedded
          1 linux-hams
          1 linux-hexagon
          1 linux-hotplug
          1 linux-laptop
          1 linux-sound
          1 trinity
          1 reiserfs-devel
          1 linux-metag
          1 linux-x25
          1 linux-nilfs
          1 lvs-devel
          1 netfilter
          1 linux-oxnas
          1 u-boot-amlogic
          1 lm-sensors
          1 lvm-devel
          1 acpica-devel
          1 perfbook
          1 virtio-fs
          1 smatch
          1 ../../../../../fuego
          1 ../../../../../wireless-regdb
          1 ../../../../../igt-dev
          1 ../../../../../powertop

git clone https://yhbt.net/lore/pub/scm/utils/stalld/stalld.git