+28
−34
+19
−3
Loading
By default g_scheduler is now NULL. It can be set either by event framework or RPC. To keep RPC consistent, the 'static' scheduler was kept. All access to the g_scheduler is done via _spdk_scheduler_get(). Access to its members is done to balance, get name for RPC and through _spdk_scheduler_set(). All of them happen on scheduling reactor and don't pose race condition when changing scheduler. There is no need to delay init/deinit of scheduler via g_new_scheduler. This variable was removed and all that happens in _spdk_scheduler_set(). To unset and deinitialize current scheduler, _spdk_scheduler_set(NULL) has to be called. This results in moving scheduler deinitalization to that call too. Every spdk_scheduler callback is now mandatory. Signed-off-by:Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I1fed766989de9bcaeb7e82b490c1275f3572d77d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8811 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@gmail.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com>