event: Change _spdk_scheduler_period_set() to use usec as argument instead of ticks
That is more inline with other places we do things like this in SPDK. Also change argument type to uint64_t. Change-Id: Ie98f6c37bf53d583431ea9edd7d977075aeaa7a0 Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5876 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
f3bf9f501a
commit
cc0d13f7e6
@ -321,10 +321,9 @@ int _spdk_scheduler_set(char *name);
|
||||
/**
|
||||
* Change current scheduling period.
|
||||
*
|
||||
* \param period New period (ticks).
|
||||
* Use spdk_get_ticks_hz() to translate seconds to ticks.
|
||||
* \param period New period (microseconds).
|
||||
*/
|
||||
void _spdk_scheduler_period_set(uint32_t period);
|
||||
void _spdk_scheduler_period_set(uint64_t period);
|
||||
|
||||
/*
|
||||
* Macro used to register new reactor balancer.
|
||||
|
@ -68,7 +68,7 @@ TAILQ_HEAD(, spdk_scheduler) g_scheduler_list
|
||||
static struct spdk_scheduler *g_scheduler;
|
||||
static struct spdk_scheduler *g_new_scheduler;
|
||||
static struct spdk_reactor *g_scheduling_reactor;
|
||||
static uint32_t g_scheduler_period;
|
||||
static uint64_t g_scheduler_period;
|
||||
static struct spdk_scheduler_core_info *g_core_infos = NULL;
|
||||
|
||||
TAILQ_HEAD(, spdk_governor) g_governor_list
|
||||
@ -132,9 +132,10 @@ _spdk_scheduler_set(char *name)
|
||||
}
|
||||
|
||||
void
|
||||
_spdk_scheduler_period_set(uint32_t period)
|
||||
_spdk_scheduler_period_set(uint64_t period)
|
||||
{
|
||||
g_scheduler_period = period;
|
||||
/* Convert microseconds to ticks */
|
||||
g_scheduler_period = period * spdk_get_ticks_hz() / SPDK_SEC_TO_USEC;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user