irqbalance: handle deepestcache option
authorRui Salvaterra <redacted>
Thu, 23 Jun 2022 08:09:13 +0000 (09:09 +0100)
committerHannu Nyman <redacted>
Thu, 23 Jun 2022 09:44:17 +0000 (12:44 +0300)
Allow the user to specify the level at which irqbalance assumes the cache
domains are partitioned. Keep the default value of 2.

Signed-off-by: Rui Salvaterra <redacted>
utils/irqbalance/files/irqbalance.config
utils/irqbalance/files/irqbalance.init

index cc9382d612abcfa03645c96579b024ad2d9fb650..b2afb7ed27859bcb0773740b72801819cbdf62bc 100644 (file)
@@ -1,6 +1,10 @@
 config irqbalance 'irqbalance'
        option enabled '0'
 
+       # Level at which irqbalance partitions cache domains.
+       # Default is 2 (L2$).
+       #option deepestcache '2'
+
        # The default value is 10 seconds
        #option interval '10'
 
index 638dcb39f65ae4973424495926f795da6b74b366..a221de08b93b3b2a33e24f0b8d89c7596802c632 100644 (file)
@@ -16,6 +16,9 @@ start_service() {
        config_get_bool enabled irqbalance enabled 0
        [ "$enabled" -gt 0 ] || return 0
 
+       # 2 is the default
+       config_get deepestcache irqbalance deepestcache 2
+
        # 10 is the default
        config_get interval irqbalance interval 10
 
@@ -28,7 +31,7 @@ start_service() {
        config_list_foreach irqbalance banirq handle_banirq_value
 
        procd_open_instance "irqbalance"
-       procd_set_param command /usr/sbin/irqbalance -f -t "$interval" "$banirq"
+       procd_set_param command /usr/sbin/irqbalance -f -c "$deepestcache" -t "$interval" "$banirq"
        procd_set_param respawn
        procd_close_instance
 }
git clone https://git.99rst.org/PROJECT