From 84a2df1c9962a87f55e1c0d3bd2118fd754a4b48 Mon Sep 17 00:00:00 2001 From: hejingxian Date: Fri, 3 Jan 2020 16:43:28 +0800 Subject: [PATCH] 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 | 14 ++++++++++++-- irqbalance.h | 3 ++- irqlist.c | 15 ++++++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/irqbalance.c b/irqbalance.c index 1ca401e..15fb0fe 100644 --- a/irqbalance.c +++ b/irqbalance.c @@ -69,6 +69,8 @@ int sleep_interval = SLEEP_INTERVAL; long HZ; int sleep_interval = SLEEP_INTERVAL; int last_interval; +unsigned long migrate_val = 0; +unsigned long load_limit = 0; GMainLoop *main_loop; char *cpu_ban_string = NULL; @@ -106,6 +108,8 @@ struct option lopts[] = { {"banmod", 1 , NULL, 'm'}, {"interval", 1 , NULL, 't'}, {"version", 0, NULL, 'V'}, + {"migrateval", 1, NULL, 'e'}, + {"loadlimit", 1, NULL, 'g'}, {0, 0, 0, 0} }; @@ -114,7 +118,7 @@ static void usage(void) { log(TO_CONSOLE, LOG_INFO, "irqbalance [--oneshot | -o] [--debug | -d] [--foreground | -f] [--journal | -j] [--hintpolicy= | -h [exact|subset|ignore]]\n"); log(TO_CONSOLE, LOG_INFO, " [--powerthresh= | -p | ] [--banirq= | -i ] [--banmod= | -m ] [--policyscript= | -l