From d1a6901c6176d373910fafd011eda3995df10450 Mon Sep 17 00:00:00 2001 From: Wojciech Malikowski Date: Thu, 13 Dec 2018 08:21:46 -0500 Subject: [PATCH] event: reactor loop delay configurable from cmdline Change-Id: I38ab7b60d528fa9e0161ddba48c723601d8a6b78 Signed-off-by: Wojciech Malikowski Reviewed-on: https://review.gerrithub.io/437142 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- lib/event/app.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/event/app.c b/lib/event/app.c index de2f29443..c0a7889bf 100644 --- a/lib/event/app.c +++ b/lib/event/app.c @@ -119,6 +119,8 @@ static const struct option g_cmdline_options[] = { {"huge-dir", no_argument, NULL, HUGE_DIR_OPT_IDX}, #define NUM_TRACE_ENTRIES_OPT_IDX 260 {"num-trace-entries", required_argument, NULL, NUM_TRACE_ENTRIES_OPT_IDX}, +#define MAX_REACTOR_DELAY_OPT_IDX 261 + {"max-delay", required_argument, NULL, MAX_REACTOR_DELAY_OPT_IDX}, }; /* Global section */ @@ -732,6 +734,7 @@ usage(void (*app_usage)(void)) printf(" --silence-noticelog disable notice level logging to stderr\n"); printf(" -u, --no-pci disable PCI access\n"); printf(" --wait-for-rpc wait for RPCs to initialize subsystems\n"); + printf(" --max-delay maximum reactor delay (in microseconds)\n"); printf(" -B, --pci-blacklist \n"); printf(" pci addr to blacklist (can be used more than once)\n"); printf(" -R, --huge-unlink unlink huge files after initialization\n"); @@ -943,6 +946,12 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts, goto out; } break; + case MAX_REACTOR_DELAY_OPT_IDX: + if (optarg == NULL) { + goto out; + } + opts->max_delay_us = atoi(optarg); + break; case '?': /* * In the event getopt() above detects an option