Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Feb 2018 19:01:07 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r328699 - stable/11/sys/dev/nvme
Message-ID:  <201802011901.w11J17Rp002948@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Feb  1 19:01:06 2018
New Revision: 328699
URL: https://svnweb.freebsd.org/changeset/base/328699

Log:
  MFC r324075 (by imp): 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.

Modified:
  stable/11/sys/dev/nvme/nvme_sim.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/nvme/nvme_sim.c
==============================================================================
--- stable/11/sys/dev/nvme/nvme_sim.c	Thu Feb  1 19:00:05 2018	(r328698)
+++ stable/11/sys/dev/nvme/nvme_sim.c	Thu Feb  1 19:01:06 2018	(r328699)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802011901.w11J17Rp002948>