35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
|
|
From 7db6af3a25c9742febce616081a723e1c92889d1 Mon Sep 17 00:00:00 2001
|
||
|
|
From: BiaoXiang Ye <yebiaoxiang@huawei.com>
|
||
|
|
Date: Wed, 1 Jul 2020 12:05:33 +0800
|
||
|
|
Subject: [PATCH] feature: add ability to set hintpolicy during runtime
|
||
|
|
|
||
|
|
irqbalance adds default config --hintpolicy=subset, so we need provide the ability to set
|
||
|
|
hintpolicy back to ignore during runtime.
|
||
|
|
---
|
||
|
|
irqbalance.c | 9 +++++++++
|
||
|
|
1 file changed, 9 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/irqbalance.c b/irqbalance.c
|
||
|
|
index 859fd6a..ffbb191 100644
|
||
|
|
--- a/irqbalance.c
|
||
|
|
+++ b/irqbalance.c
|
||
|
|
@@ -538,6 +538,15 @@ gboolean sock_handle(gint fd, GIOCondition condition, gpointer user_data __attri
|
||
|
|
cpu_ban_string = NULL;
|
||
|
|
}
|
||
|
|
need_rescan = 1;
|
||
|
|
+ } else if (!(strncmp(buff + strlen("settings "), "hintpolicy ",
|
||
|
|
+ strlen("hintpolicy ")))) {
|
||
|
|
+ if (!(strncmp(buff + strlen("settings hintpolicy "), "ignore",
|
||
|
|
+ strlen("ignore")))) {
|
||
|
|
+ hint_enabled = 0;
|
||
|
|
+ } else if (!(strncmp(buff + strlen("settings hintpolicy "),
|
||
|
|
+ "subset", strlen("subset")))) {
|
||
|
|
+ hint_enabled = 1;
|
||
|
|
+ }
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if (!strncmp(buff, "setup", strlen("setup"))) {
|
||
|
|
--
|
||
|
|
2.23.0
|
||
|
|
|