lib/event: fix refreshing tsc_last when returning to poll mode
(a5ad0f80
) lib/event: update reactor tsc_last going poll mode
Patch above updated the tsc_last at the very end of changing
interrupt mode of the reactor.
The flow for turning from interrupt mode to poll mode is
first to send an event to the target lcore, then to iterate
over all reactors updating notify_cpuset on each.
Previous patch updated the tsc_last after notify_cpuset was
updated, meanwhile the threads could already been put on it.
This patch moves it immidietly to the point of changing
the in_interrupt state.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6aea252016f4706369b8b597b765593bc6edca3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8111
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
parent
e837ba3bde
commit
da11c9d2a2
@ -363,9 +363,6 @@ _reactor_set_notify_cpuset_cpl(void *arg1, void *arg2)
|
||||
struct spdk_reactor *target = arg1;
|
||||
|
||||
if (target->new_in_interrupt == false) {
|
||||
/* Reactor is no longer in interrupt mode. Refresh the tsc_last to accurately
|
||||
* track reactor stats. */
|
||||
target->tsc_last = spdk_get_ticks();
|
||||
target->set_interrupt_mode_in_progress = false;
|
||||
spdk_thread_send_msg(_spdk_get_app_thread(), target->set_interrupt_mode_cb_fn,
|
||||
target->set_interrupt_mode_cb_arg);
|
||||
@ -408,6 +405,9 @@ _reactor_set_interrupt_mode(void *arg1, void *arg2)
|
||||
}
|
||||
|
||||
if (target->new_in_interrupt == false) {
|
||||
/* Reactor is no longer in interrupt mode. Refresh the tsc_last to accurately
|
||||
* track reactor stats. */
|
||||
target->tsc_last = spdk_get_ticks();
|
||||
spdk_for_each_reactor(_reactor_set_notify_cpuset, target, NULL, _reactor_set_notify_cpuset_cpl);
|
||||
} else {
|
||||
uint64_t notify = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user