代码拉取完成,页面将自动刷新
From eee7917ef5272691b9d4ee6341463f3c78f7f909 Mon Sep 17 00:00:00 2001
From: Robin Jarry <[email protected]>
Date: Wed, 12 Jul 2023 17:49:13 +0200
Subject: [PATCH] activate_mapping: only blacklist irq if error is considered
permanent
Reference: https://github.com/Irqbalance/irqbalance/commit/eee7917ef5272691b9d4ee6341463f3c78f7f909
Conflict: NA
Some errors reported when writing to smp_affinity are transient. For
example, when a CPU interrupt controller does not have enough room to
map the IRQ, the kernel will return "No space left on device".
This kind of situation can change over time. Do not mark the IRQ
affinity as "unmanaged". Let irqbalance try again later.
Signed-off-by: Robin Jarry <[email protected]>
---
activate.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/activate.c b/activate.c
index 4418cda..7353692 100644
--- a/activate.c
+++ b/activate.c
@@ -91,9 +91,23 @@ static void activate_mapping(struct irq_info *info, void *data __attribute__((un
info->moved = 0; /*migration is done*/
error:
log(TO_ALL, LOG_WARNING,
- "Cannot change IRQ %i affinity: %s. Will never try again.\n",
+ "Cannot change IRQ %i affinity: %s\n",
info->irq, strerror(errsave));
- info->flags |= IRQ_FLAG_AFFINITY_UNMANAGED;
+ switch (errsave) {
+ case ENOSPC: /* Specified CPU APIC is full. */
+ case EAGAIN: /* Interrupted by signal. */
+ case EBUSY: /* Affinity change already in progress. */
+ case EINVAL: /* IRQ would be bound to no CPU. */
+ case ERANGE: /* CPU in mask is offline. */
+ case ENOMEM: /* Kernel cannot allocate CPU mask. */
+ /* Do not blacklist the IRQ on transient errors. */
+ break;
+ default:
+ /* Any other error is considered permanent. */
+ info->flags |= IRQ_FLAG_AFFINITY_UNMANAGED;
+ log(TO_ALL, LOG_WARNING, "IRQ %i affinity is now unmanaged\n",
+ info->irq);
+ }
}
void activate_mappings(void)
--
2.28.0.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。