Print this page
7364 NVMe driver performance can be improved by caching nvme_dma_t structs for PRPL.
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Garrett D'Amore <garrett@lucera.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/nvme/nvme_var.h
          +++ new/usr/src/uts/common/io/nvme/nvme_var.h
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
       14 + * Copyright 2016 The MathWorks, Inc. All rights reserved.
  14   15   */
  15   16  
  16   17  #ifndef _NVME_VAR_H
  17   18  #define _NVME_VAR_H
  18   19  
  19   20  #include <sys/ddi.h>
  20   21  #include <sys/sunddi.h>
  21   22  #include <sys/blkdev.h>
  22   23  #include <sys/taskq_impl.h>
  23   24  
↓ open down ↓ 26 lines elided ↑ open up ↑
  50   51  typedef struct nvme_qpair nvme_qpair_t;
  51   52  typedef struct nvme_task_arg nvme_task_arg_t;
  52   53  
  53   54  struct nvme_dma {
  54   55          ddi_dma_handle_t nd_dmah;
  55   56          ddi_acc_handle_t nd_acch;
  56   57          ddi_dma_cookie_t nd_cookie;
  57   58          uint_t nd_ncookie;
  58   59          caddr_t nd_memp;
  59   60          size_t nd_len;
       61 +        boolean_t nd_cached;
  60   62  };
  61   63  
  62   64  struct nvme_cmd {
  63   65          nvme_sqe_t nc_sqe;
  64   66          nvme_cqe_t nc_cqe;
  65   67  
  66   68          void (*nc_callback)(void *);
  67   69          bd_xfer_t *nc_xfer;
  68   70          boolean_t nc_completed;
  69   71          uint16_t nc_sqid;
↓ open down ↓ 31 lines elided ↑ open up ↑
 101  103  };
 102  104  
 103  105  struct nvme {
 104  106          dev_info_t *n_dip;
 105  107          int n_progress;
 106  108  
 107  109          caddr_t n_regs;
 108  110          ddi_acc_handle_t n_regh;
 109  111  
 110  112          kmem_cache_t *n_cmd_cache;
      113 +        kmem_cache_t *n_prp_cache;
 111  114  
 112  115          size_t n_inth_sz;
 113  116          ddi_intr_handle_t *n_inth;
 114  117          int n_intr_cnt;
 115  118          uint_t n_intr_pri;
 116  119          int n_intr_cap;
 117  120          int n_intr_type;
 118  121          int n_intr_types;
 119  122  
 120  123          char *n_product;
↓ open down ↓ 122 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX