From 7f77fc97cb259da3f6097be347e4fcacd4f864d9 Mon Sep 17 00:00:00 2001 From: hejingxian 00273181 Date: Mon, 20 Jan 2020 23:01:19 +0800 Subject: [PATCH 1/2] make the option 'V' closer to the option with no arg --- irqbalance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irqbalance.c b/irqbalance.c index e76d27b..be111f1 100644 --- a/irqbalance.c +++ b/irqbalance.c @@ -118,7 +118,7 @@ static void parse_command_line(int argc, char **argv) unsigned long val; while ((opt = getopt_long(argc, argv, - "odfji:p:s:c:l:m:t:V", + "odfjVi:p:s:c:l:m:t:", lopts, &longind)) != -1) { switch(opt) { From e9e28114036a198b311ee17dd542540f749e6a68 Mon Sep 17 00:00:00 2001 From: hejingxian 00273181 Date: Mon, 20 Jan 2020 23:20:47 +0800 Subject: [PATCH 2/2] improve irq migrate rule to avoid high irq load --- irqbalance.c | 9 +++++++-- irqbalance.h | 1 + irqlist.c | 10 +++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/irqbalance.c b/irqbalance.c index be111f1..513ab5a 100644 --- a/irqbalance.c +++ b/irqbalance.c @@ -67,6 +67,7 @@ GMainLoop *main_loop; char *cpu_ban_string = NULL; char *banned_cpumask_from_ui = NULL; +unsigned long migrate_ratio = 0; static void sleep_approx(int seconds) { @@ -96,6 +97,7 @@ struct option lopts[] = { {"banmod", 1 , NULL, 'm'}, {"interval", 1 , NULL, 't'}, {"version", 0, NULL, 'V'}, + {"migrateval", 1, NULL, 'e'}, {0, 0, 0, 0} }; @@ -103,7 +105,7 @@ static void usage(void) { log(TO_CONSOLE, LOG_INFO, "irqbalance [--oneshot | -o] [--debug | -d] [--foreground | -f] [--journal | -j]\n"); log(TO_CONSOLE, LOG_INFO, " [--powerthresh= | -p | ] [--banirq= | -i ] [--banmod= | -m ] [--policyscript= | -l