Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Aug 2017 19:27:33 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r322977 - in head/sys/cam: ata nvme
Message-ID:  <201708281927.v7SJRXpB003118@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Mon Aug 28 19:27:33 2017
New Revision: 322977
URL: https://svnweb.freebsd.org/changeset/base/322977

Log:
  Add comment about where we need to place this routine, and why.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/nvme/nvme_da.c

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c	Mon Aug 28 19:25:49 2017	(r322976)
+++ head/sys/cam/ata/ata_da.c	Mon Aug 28 19:27:33 2017	(r322977)
@@ -2853,6 +2853,12 @@ adadone(struct cam_periph *periph, union ccb *done_ccb
 		if (softc->outstanding_cmds == 0)
 			softc->flags |= ADA_FLAG_WAS_OTAG;
 
+		/*
+		 * We need to call cam_iosched before we call biodone so that we
+		 * don't measure any activity that happens in the completion
+		 * routine, which in the case of sendfile can be quite
+		 * extensive.
+		 */
 		cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
 		xpt_release_ccb(done_ccb);
 		if (state == ADA_CCB_TRIM) {

Modified: head/sys/cam/nvme/nvme_da.c
==============================================================================
--- head/sys/cam/nvme/nvme_da.c	Mon Aug 28 19:25:49 2017	(r322976)
+++ head/sys/cam/nvme/nvme_da.c	Mon Aug 28 19:27:33 2017	(r322977)
@@ -1021,6 +1021,12 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb
 			free(bp->bio_driver2, M_NVMEDA);
 		softc->outstanding_cmds--;
 
+		/*
+		 * We need to call cam_iosched before we call biodone so that we
+		 * don't measure any activity that happens in the completion
+		 * routine, which in the case of sendfile can be quite
+		 * extensive.
+		 */
 		cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
 		xpt_release_ccb(done_ccb);
 		if (state == NDA_CCB_TRIM) {



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