From 84a2df1c9962a87f55e1c0d3bd2118fd754a4b48 Mon Sep 17 00:00:00 2001 From: hejingxian Date: Fri, 3 Jan 2020 16:43:28 +0800 Subject: [PATCH] feature: add new irq migrate rule to avoid high cpu irq load By the old irq migrate rule, the irqs cannot be moved if the adjustment_load will become smaller then the min_load after moving irq. However, we can accept that the delta load become smaller after moving irq. --- irqbalance.c | 8 +++++++- irqbalance.h | 1 + irqlist.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/irqbalance.c b/irqbalance.c index 9449e40..82ac3ea 100644 --- a/irqbalance.c +++ b/irqbalance.c @@ -72,6 +72,7 @@ GMainLoop *main_loop; char *cpu_ban_string = NULL; char *banned_cpumask_from_ui = NULL; unsigned long migrate_ratio = 0; +unsigned long load_limit = 0; static void sleep_approx(int seconds) { @@ -106,6 +107,7 @@ struct option lopts[] = { {"hintpolicy", 1, NULL, 'h'}, {"verifyhint", 1, NULL, 'v'}, {"notclearhint", 0, NULL, 'n'}, + {"loadlimit", 1, NULL, 'g'}, {0, 0, 0, 0} }; @@ -115,6 +117,7 @@ static void usage(void) log(TO_CONSOLE, LOG_INFO, " [--powerthresh= | -p | ] [--banirq= | -i ] [--banmod= | -m ] [--policyscript= | -l