irqbalance/backport-Slience-.-rebalancing-messages-for-unmigratable-IRQs.patch

85 lines
2.8 KiB
Diff
Raw Permalink Normal View History

From ad0ea2c4c09d6aa76e6c3f87587047cbaddf254e Mon Sep 17 00:00:00 2001
From: StefanBruens <stefan.bruens@rwth-aachen.de>
Date: Wed, 13 Dec 2023 01:28:59 +0100
Subject: [PATCH] Slience "... rebalancing" messages for unmigratable IRQs
It is fairly pointless to try migrating an IRQ which is known
to be unmigratable.
Instead of using an extra flag, set the `level` to BALANCE_NONE,
which shortcuts quite some code, and implicitly also disables
the misleading repeated log message:
```
Dez 10 02:52:55 varm irqbalance[828]: Selecting irq 75 for rebalancing
Dez 10 02:52:55 varm irqbalance[828]: Cannot change IRQ 75 affinity: Input/output error
Dez 10 02:52:55 varm irqbalance[828]: IRQ 75 affinity is now unmanaged
...
Dez 10 02:52:55 varm irqbalance[828]: Selecting irq 75 for rebalancing
...
Dez 10 02:52:55 varm irqbalance[828]: Selecting irq 75 for rebalancing
```
Reference: https://github.com/Irqbalance/irqbalance/commit/ad0ea2c4c09d6aa76e6c3f87587047cbaddf254e
Conflict: The community patch set the info->level flag. However, the
backport-feature-introduce-verifyhint-to-detect-hint-variatio.patch patch deletes the judgment of
info->moved in the activate_mapping function. As a result, the irqbalance prints logs every 10 seconds.
Therefore, the community patch is modified to add the judgment of info->level flag.
---
activate.c | 5 +++--
irqlist.c | 2 +-
types.h | 1 -
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/activate.c b/activate.c
index 548a401..4830f34 100644
--- a/activate.c
+++ b/activate.c
@@ -62,7 +62,7 @@ static void activate_mapping(struct irq_info *info, void *data __attribute__((un
if (!info->assigned_obj)
return;
- if (info->flags & IRQ_FLAG_AFFINITY_UNMANAGED)
+ if (info->level == BALANCE_NONE)
return;
/* activate only online cpus, otherwise writing to procfs returns EOVERFLOW */
@@ -105,7 +102,8 @@ error:
break;
default:
/* Any other error is considered permanent. */
- info->flags |= IRQ_FLAG_AFFINITY_UNMANAGED;
+ info->level = BALANCE_NONE;
+ info->moved = 0; /* migration impossible, mark as done */
log(TO_ALL, LOG_WARNING, "IRQ %i affinity is now unmanaged\n",
info->irq);
}
diff --git a/irqlist.c b/irqlist.c
index 4dd4a83..0ba411e 100644
--- a/irqlist.c
+++ b/irqlist.c
@@ -78,7 +78,7 @@ static void move_candidate_irqs(struct irq_info *info, void *data)
struct load_balance_info *lb_info = data;
unsigned long delta_load = 0;
- /* Don't rebalance irqs that don't want it */
+ /* Don't rebalance irqs that don't want or support it */
if (info->level == BALANCE_NONE)
return;
diff --git a/types.h b/types.h
index c63cfea..ea1fae8 100644
--- a/types.h
+++ b/types.h
@@ -35,7 +35,6 @@
* IRQ Internal tracking flags
*/
#define IRQ_FLAG_BANNED (1ULL << 0)
-#define IRQ_FLAG_AFFINITY_UNMANAGED (1ULL << 1)
enum obj_type_e {
OBJ_TYPE_CPU,
--
2.28.0.windows.1