svn commit: r324075 - head/sys/dev/nvme
Warner Losh
imp at FreeBSD.org
Thu Sep 28 01:27:01 UTC 2017
Author: imp
Date: Thu Sep 28 01:27:00 2017
New Revision: 324075
URL: https://svnweb.freebsd.org/changeset/base/324075
Log:
Tweak performance of nda completions
Use xpt_done_direct in preference to xpt_done when completing a
successful I/O. Continue to use xpt_done when there's an error, or for
completion of the submission of a CCB. This eliminates a context
switch to the cam_doneq thread.
Sponsored by: Netflix
Suggested by: scottl@
Modified:
head/sys/dev/nvme/nvme_sim.c
Modified: head/sys/dev/nvme/nvme_sim.c
==============================================================================
--- head/sys/dev/nvme/nvme_sim.c Wed Sep 27 23:23:41 2017 (r324074)
+++ head/sys/dev/nvme/nvme_sim.c Thu Sep 28 01:27:00 2017 (r324075)
@@ -73,11 +73,13 @@ nvme_sim_nvmeio_done(void *ccb_arg, const struct nvme_
* it means. Make our best guess, though for the status code.
*/
memcpy(&ccb->nvmeio.cpl, cpl, sizeof(*cpl));
- if (nvme_completion_is_error(cpl))
+ if (nvme_completion_is_error(cpl)) {
ccb->ccb_h.status = CAM_REQ_CMP_ERR;
- else
+ xpt_done(ccb);
+ } else {
ccb->ccb_h.status = CAM_REQ_CMP;
- xpt_done(ccb);
+ xpt_done_direct(ccb);
+ }
}
static void
More information about the svn-src-all
mailing list