When running io_loop() let insertions and removals counters take precedence before timeouts. This will let us determine the cause of premature io_loop() exit in case of timeout. Consider two scenarios: First: 1. Hotplug app records enough insertions/removals 2. During "if (now > tsc_end)" check it also notices that it should terminate due to time constraint 3. Hotplug exits using the timeout condition, because enough time has passed and no error is printed at this point. Second: 1. Hotplug app did not record enough insertions/removals during app runtime 2. During "if (now > tsc_end)" check it also notices that it should terminate due to time constraint 3. Hotplug exits using the timeout condition, because enough time has passed and no error is printed at this point. After prioritizing the check on counters we avoid the first scenario and timeout will be checked after the counters were confirmed to be less than expected value, allowing us to determine the cause of failure earlier. Additionally added an errorlog to the body of the if checking for timeout to signal this failure. First part of the series fixing #2201. Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Change-Id: I3f6f9c5c95e82e0a003419fcf181d858ffbd94dd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15964 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
hotplug_plugin.py | ||
hotplug.c | ||
Makefile |