irqbalance: add banned_cpulist option
authorHentioe Cl <meow.i5.br@gmail.com>
Sat, 5 Aug 2023 07:01:49 +0000 (10:01 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 5 Aug 2023 07:06:32 +0000 (10:06 +0300)
Configure CPUs to ignore with `IRQBALANCE_BANNED_CPULIST` environment variable

Signed-off-by: Hentioe Cl <meow.i5.br@gmail.com>
[added PKG_RELEASE bump]

utils/irqbalance/Makefile
utils/irqbalance/files/irqbalance.config
utils/irqbalance/files/irqbalance.init

index 903900e7587d02ead297d527057b43331d0ab814..6717c352e56d3cb410f21c00348cc24f46cfbf79 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=irqbalance
 PKG_VERSION:=1.9.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/Irqbalance/irqbalance.git
index b2afb7ed27859bcb0773740b72801819cbdf62bc..967b14d9a599616b0d942110bafa055de7de7ccc 100644 (file)
@@ -8,6 +8,9 @@ config irqbalance 'irqbalance'
        # The default value is 10 seconds
        #option interval '10'
 
+       # Specify excluded cpulist
+       #option banned_cpulist '0'
+
        # List of IRQ's to ignore
        #list banirq '36'
        #list banirq '69'
index a221de08b93b3b2a33e24f0b8d89c7596802c632..2c4248b382778cf17d9e7c66b62688bcd6df4d6c 100644 (file)
@@ -22,6 +22,9 @@ start_service() {
        # 10 is the default
        config_get interval irqbalance interval 10
 
+       # empty is the default
+       config_get banned_cpulist irqbalance banned_cpulist ''
+
        # A list of IRQ's to ignore
        banirq=""
        handle_banirq_value()
@@ -31,6 +34,9 @@ start_service() {
        config_list_foreach irqbalance banirq handle_banirq_value
 
        procd_open_instance "irqbalance"
+       if [ -n "$banned_cpulist" ]; then
+               procd_set_param env IRQBALANCE_BANNED_CPULIST="$banned_cpulist"
+       fi
        procd_set_param command /usr/sbin/irqbalance -f -c "$deepestcache" -t "$interval" "$banirq"
        procd_set_param respawn
        procd_close_instance