diff options
author | Paul Winder <paul@winders.demon.co.uk> | 2019-10-16 10:19:13 +0100 |
---|---|---|
committer | Robert Mustacchi <rm@fingolfin.org> | 2019-11-21 16:46:27 +0000 |
commit | 4d95620bc3105916e69c40cff8e2e3d55bd6c4ae (patch) | |
tree | 9854e5e14735ec7046da966421396b98a02e48c4 /usr/src/uts/common/sys/blkdev.h | |
parent | d15801816cc716b56ada92df72ee04b7b891291c (diff) | |
download | illumos-joyent-4d95620bc3105916e69c40cff8e2e3d55bd6c4ae.tar.gz |
11827 Increase concurrency through blkdev
11847 The nvme cmd completion queue is contentious
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Reviewed by: Matthias Scheler <matthias.scheler@wdc.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/sys/blkdev.h')
-rw-r--r-- | usr/src/uts/common/sys/blkdev.h | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/usr/src/uts/common/sys/blkdev.h b/usr/src/uts/common/sys/blkdev.h index cb6a397520..7802f06dbc 100644 --- a/usr/src/uts/common/sys/blkdev.h +++ b/usr/src/uts/common/sys/blkdev.h @@ -22,6 +22,7 @@ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright 2016 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2019 Western Digital Corporation. */ #ifndef _SYS_BLKDEV_H @@ -93,6 +94,7 @@ struct bd_xfer { unsigned x_ndmac; caddr_t x_kaddr; unsigned x_flags; + unsigned x_qnum; }; #define BD_XFER_POLL (1U << 0) /* no interrupts (dump) */ @@ -115,6 +117,8 @@ struct bd_drive { size_t d_revision_len; char *d_revision; uint8_t d_eui64[8]; + /* Added at the end to maintain binary compatibility */ + uint32_t d_qcount; }; struct bd_media { @@ -142,18 +146,26 @@ struct bd_media { #define BD_INFO_FLAG_HOTPLUGGABLE (1U << 1) #define BD_INFO_FLAG_READ_ONLY (1U << 2) +/* + * If the API changes and we want to bump the version, add another + * enum value, Eg BD_OPS_VERSION_1. BD_OPS_CURRENT_VERSION should always + * be last. + */ +typedef enum { + BD_OPS_VERSION_0 = 0, + BD_OPS_CURRENT_VERSION +} bd_version_t; + struct bd_ops { - int o_version; - void (*o_drive_info)(void *, bd_drive_t *); - int (*o_media_info)(void *, bd_media_t *); - int (*o_devid_init)(void *, dev_info_t *, ddi_devid_t *); - int (*o_sync_cache)(void *, bd_xfer_t *); - int (*o_read)(void *, bd_xfer_t *); - int (*o_write)(void *, bd_xfer_t *); + bd_version_t o_version; + void (*o_drive_info)(void *, bd_drive_t *); + int (*o_media_info)(void *, bd_media_t *); + int (*o_devid_init)(void *, dev_info_t *, ddi_devid_t *); + int (*o_sync_cache)(void *, bd_xfer_t *); + int (*o_read)(void *, bd_xfer_t *); + int (*o_write)(void *, bd_xfer_t *); }; -#define BD_OPS_VERSION_0 0 - struct bd_errstats { /* these are managed by blkdev itself */ kstat_named_t bd_softerrs; |