bdev: Configure max_ios_per_timeslice when QoS is initialized
This value was recalculated on each time slice. Instead, just set it up right away. Right now QoS is statically configured at creation time for bdevs, which means we can get away with this. Once dynamic configuration is added, events will need to be sent to the QoS thread. Change-Id: I8bde4170f2d882d2c0f5e57a6aa7713d045beb7d Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/407355 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
4ca87a01b4
commit
2931d638e7
@ -1007,7 +1007,7 @@ spdk_bdev_config_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_bdev_qos_get_max_ios_per_timeslice(struct spdk_bdev_channel *qos_ch)
|
spdk_bdev_qos_update_max_ios_per_timeslice(struct spdk_bdev_channel *qos_ch)
|
||||||
{
|
{
|
||||||
uint64_t qos_max_ios_per_timeslice = 0;
|
uint64_t qos_max_ios_per_timeslice = 0;
|
||||||
struct spdk_bdev *bdev = qos_ch->bdev;
|
struct spdk_bdev *bdev = qos_ch->bdev;
|
||||||
@ -1025,7 +1025,6 @@ spdk_bdev_channel_poll_qos(void *arg)
|
|||||||
|
|
||||||
/* Reset for next round of rate limiting */
|
/* Reset for next round of rate limiting */
|
||||||
ch->io_submitted_this_timeslice = 0;
|
ch->io_submitted_this_timeslice = 0;
|
||||||
spdk_bdev_qos_get_max_ios_per_timeslice(ch);
|
|
||||||
|
|
||||||
_spdk_bdev_qos_io_submit(ch);
|
_spdk_bdev_qos_io_submit(ch);
|
||||||
|
|
||||||
@ -1100,7 +1099,8 @@ spdk_bdev_qos_channel_create(struct spdk_bdev *bdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bdev->qos_channel->flags |= BDEV_CH_QOS_ENABLED;
|
bdev->qos_channel->flags |= BDEV_CH_QOS_ENABLED;
|
||||||
spdk_bdev_qos_get_max_ios_per_timeslice(bdev->qos_channel);
|
spdk_bdev_qos_update_max_ios_per_timeslice(bdev->qos_channel);
|
||||||
|
|
||||||
bdev->qos_channel->qos_poller = spdk_poller_register(
|
bdev->qos_channel->qos_poller = spdk_poller_register(
|
||||||
spdk_bdev_channel_poll_qos,
|
spdk_bdev_channel_poll_qos,
|
||||||
bdev->qos_channel,
|
bdev->qos_channel,
|
||||||
|
Loading…
Reference in New Issue
Block a user