From c59eb7b01d52f97292c24675a4f8afb41529c3a8 Mon Sep 17 00:00:00 2001 From: SuperSix173 Date: Thu, 2 Jun 2022 08:31:19 +0000 Subject: [PATCH] assign pol to -1 when user_policy_list isn't NULL --- feature-add-new-user-irq-policy-config-rule.patch | 8 +++++--- irqbalance.spec | 8 +++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/feature-add-new-user-irq-policy-config-rule.patch b/feature-add-new-user-irq-policy-config-rule.patch index ff129d0..0680c29 100644 --- a/feature-add-new-user-irq-policy-config-rule.patch +++ b/feature-add-new-user-irq-policy-config-rule.patch @@ -8,13 +8,13 @@ Therefore, we introduce a new user irq policy config rule which avoid policy scr for every irq. --- Makefile.am | 2 +- - classify.c | 19 ++++-- + classify.c | 21 ++++-- irqbalance.c | 15 ++++- irqbalance.h | 1 + placement.c | 3 +- rules_config.c | 174 +++++++++++++++++++++++++++++++++++++++++++++++++ rules_config.h | 40 ++++++++++++ - 7 files changed, 244 insertions(+), 10 deletions(-) + 7 files changed, 246 insertions(+), 10 deletions(-) create mode 100644 rules_config.c create mode 100644 rules_config.h @@ -35,13 +35,15 @@ diff --git a/classify.c b/classify.c index 74103bf..254197e 100644 --- a/classify.c +++ b/classify.c -@@ -625,12 +625,18 @@ static void add_new_irq(char *path, struct irq_info *hint, GList *proc_interrupt +@@ -625,12 +625,20 @@ static void add_new_irq(char *path, struct irq_info *hint, GList *proc_interrupt return; /* Set NULL devpath for the irq has no sysfs entries */ - get_irq_user_policy(path, irq, &pol); + if (user_policy_list == NULL) { + get_irq_user_policy(path, irq, &pol); ++ } else { ++ memset(&pol, -1, sizeof(struct user_irq_policy)); + } if ((pol.ban == 1) || check_for_irq_ban(irq, proc_interrupts)) { /*FIXME*/ __add_banned_irq(irq, &banned_irqs); diff --git a/irqbalance.spec b/irqbalance.spec index 70704df..e490958 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -1,7 +1,7 @@ Summary: A dynamic adaptive IRQ balancing daemon Name: irqbalance Version: 1.8.0 -Release: 5 +Release: 6 Epoch: 3 License: GPLv2 Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz#/irqbalance-%{version}.tar.gz @@ -123,6 +123,12 @@ fi /sbin/chkconfig --del %{name} >/dev/null 2>&1 || : %changelog +* Thu Jun 2 2022 Liu Chao - 3:1.8.0-6 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC: assign pol to -1 when user_policy_list isn't NULL + * Tue Apr 12 2021 Liu Chao - 3:1.8.0-5 - Type:bugfix - ID:NA