Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2017 20:15:55 +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: r323624 - head/sys/cam
Message-ID:  <201709152015.v8FKFtn3050862@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Sep 15 20:15:55 2017
New Revision: 323624
URL: https://svnweb.freebsd.org/changeset/base/323624

Log:
  Update comments on what the CAM_IOSCHED_FLAG_TRIM_ACTIVE means.
  
  It's intended only for those situations where the periph driver
  ones to limit the number of trims active to one and only one.
  Also update comments on associated functions.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==============================================================================
--- head/sys/cam/cam_iosched.c	Fri Sep 15 20:12:38 2017	(r323623)
+++ head/sys/cam/cam_iosched.c	Fri Sep 15 20:15:55 2017	(r323624)
@@ -673,7 +673,10 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp)
 }
 #endif
 
-			/* Trim or similar currently pending completion */
+/*
+ * Trim or similar currently pending completion. Should only be set for
+ * those drivers wishing only one Trim active at a time.
+ */
 #define CAM_IOSCHED_FLAG_TRIM_ACTIVE	(1ul << 0)
 			/* Callout active, and needs to be torn down */
 #define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
@@ -1387,7 +1390,7 @@ cam_iosched_schedule(struct cam_iosched_softc *isc, st
 }
 
 /*
- * Complete a trim request
+ * Complete a trim request. Mark that we no longer have one in flight.
  */
 void
 cam_iosched_trim_done(struct cam_iosched_softc *isc)
@@ -1437,7 +1440,8 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc
 
 /*
  * Tell the io scheduler that you've pushed a trim down into the sim.
- * xxx better place for this?
+ * This also tells the I/O scheduler not to push any more trims down, so
+ * some periphs do not call it if they can cope with multiple trims in flight.
  */
 void
 cam_iosched_submit_trim(struct cam_iosched_softc *isc)



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