Commit d969ac44 authored by Ben Walker's avatar Ben Walker
Browse files

io_channel: Remove per-channel priority



This wasn't used anywhere and we currently believe there
are superior software-only techniques for controlling
quality of service.

Change-Id: Icdadd5870ed0629b338c307d2619bbc242c3e7a3
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362065


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 94e1719b
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -86,19 +86,6 @@ by simply failing requests with an appropriate error code when the queue is
full. This allows the blobstore to easily stick to its commitment to never
block, but may require the user to provide their own queueing layer.

The NVMe specification has added support for specifying priorities on the
hardware queues. With a traditional filesystem and storage stack, however,
there is no reasonable way to map an I/O from an arbitrary thread to a
particular hardware queue to be processed with the priority requested. The
blobstore solves this by allowing the user to create channels with priorities,
which map directly to priorities on NVMe hardware queues. The user can then
choose the priority for an I/O by sending it on the appropriate channel. This
is incredibly useful for many databases where data intake operations need to
run with a much higher priority than background scrub and compaction operations
in order to stay within quality of service requirements. Note that many NVMe
devices today do not yet support queue priorities, so the blobstore considers
this feature optional.

## The Basics

The blobstore defines a hierarchy of three units of disk space. The smallest are
+1 −1
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ struct spdk_bdev_io *spdk_bdev_flush(struct spdk_bdev *bdev, struct spdk_io_chan
int spdk_bdev_free_io(struct spdk_bdev_io *bdev_io);
int spdk_bdev_reset(struct spdk_bdev *bdev, struct spdk_io_channel *ch,
		    enum spdk_bdev_reset_type, spdk_bdev_io_completion_cb cb, void *cb_arg);
struct spdk_io_channel *spdk_bdev_get_io_channel(struct spdk_bdev *bdev, uint32_t priority);
struct spdk_io_channel *spdk_bdev_get_io_channel(struct spdk_bdev *bdev);

/**
 * Get the status of bdev_io as an NVMe status code.
+1 −2
Original line number Diff line number Diff line
@@ -226,8 +226,7 @@ void spdk_bs_md_sync_blob(struct spdk_blob *blob,
/* Close a blob. This will automatically sync. */
void spdk_bs_md_close_blob(struct spdk_blob **blob, spdk_blob_op_complete cb_fn, void *cb_arg);

struct spdk_io_channel *spdk_bs_alloc_io_channel(struct spdk_blob_store *bs,
		uint32_t priority);
struct spdk_io_channel *spdk_bs_alloc_io_channel(struct spdk_blob_store *bs);

void spdk_bs_free_io_channel(struct spdk_io_channel *channel);

+2 −3
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ void spdk_fs_load(struct spdk_bs_dev *dev, fs_send_request_fn send_request_fn,
		  spdk_fs_op_with_handle_complete cb_fn, void *cb_arg);
void spdk_fs_unload(struct spdk_filesystem *fs, spdk_fs_op_complete cb_fn, void *cb_arg);

struct spdk_io_channel *spdk_fs_alloc_io_channel(struct spdk_filesystem *fs, uint32_t priority);
struct spdk_io_channel *spdk_fs_alloc_io_channel(struct spdk_filesystem *fs);

/*
 * Allocates an I/O channel suitable for using the synchronous blobfs API.  These channels do
@@ -79,8 +79,7 @@ struct spdk_io_channel *spdk_fs_alloc_io_channel(struct spdk_filesystem *fs, uin
 *  primitives used to block until any necessary I/O operations are completed on a separate
 *  polling thread.
 */
struct spdk_io_channel *spdk_fs_alloc_io_channel_sync(struct spdk_filesystem *fs,
		uint32_t priority);
struct spdk_io_channel *spdk_fs_alloc_io_channel_sync(struct spdk_filesystem *fs);

void spdk_fs_free_io_channel(struct spdk_io_channel *channel);

+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ struct spdk_io_channel;

struct spdk_copy_task;

struct spdk_io_channel *spdk_copy_engine_get_io_channel(uint32_t priority);
struct spdk_io_channel *spdk_copy_engine_get_io_channel(void);
int64_t spdk_copy_submit(struct spdk_copy_task *copy_req, struct spdk_io_channel *ch, void *dst,
			 void *src, uint64_t nbytes, spdk_copy_completion_cb cb);
int64_t spdk_copy_submit_fill(struct spdk_copy_task *copy_req, struct spdk_io_channel *ch,
Loading