irqbalance: add support of interval and banirq
authorMarc Benoit <redacted>
Sun, 23 Feb 2020 22:53:11 +0000 (17:53 -0500)
committerMarc Benoit <redacted>
Sat, 29 Feb 2020 14:39:13 +0000 (09:39 -0500)
Added the ability to change sampling interval
and provide a list of IRQ's to ignore
via /etc/config/irqbalance

Signed-off-by: Marc Benoit <redacted>
utils/irqbalance/Makefile
utils/irqbalance/files/irqbalance.config
utils/irqbalance/files/irqbalance.init

index 19116c63b4836057776a818d2f8f7f70142d072a..a0ebac2da24fc63422e7839b0f88f6107f5aa730 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=irqbalance
 PKG_VERSION:=1.6.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_PROTO:=git
index 5f074b00f45cd48a2d0c2e46e72003a2e0ba88ce..cc9382d612abcfa03645c96579b024ad2d9fb650 100644 (file)
@@ -1,3 +1,10 @@
 config irqbalance 'irqbalance'
        option enabled '0'
 
+       # The default value is 10 seconds
+       #option interval '10'
+
+       # List of IRQ's to ignore
+       #list banirq '36'
+       #list banirq '69'
+
index e794b7365be2dba5fe69012b3531747c786c2a25..3f968d075640d215ad83d8caa41f98b6a9edd727 100644 (file)
@@ -9,8 +9,19 @@ start_service() {
        config_get_bool enabled irqbalance enabled 0
        [ "$enabled" -gt 0 ] || return 0
 
+       # 10 is the default
+       config_get interval irqbalance interval 10
+
+       # A list of IRQ's to ignore
+       banirq=""
+       handle_banirq_value()
+       {
+               banirq="$banirq -i $1"
+       }
+       config_list_foreach irqbalance banirq handle_banirq_value
+
        procd_open_instance "irqbalance"
-       procd_set_param command /usr/sbin/irqbalance -f
+       procd_set_param command /usr/sbin/irqbalance -f -t "$interval" "$banirq"
        procd_set_param respawn
        procd_close_instance
 }
git clone https://git.99rst.org/PROJECT