svn commit: r323624 - head/sys/cam

Warner Losh imp at FreeBSD.org
Fri Sep 15 20:15:56 UTC 2017


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)


More information about the svn-src-head mailing list