Author: imp
Date: Mon Nov 26 22:50:30 2018
New Revision: 341003
URL: https://svnweb.freebsd.org/changeset/base/341003

Log:
  Minor tweaks to the formatting
  
  Tweak the format of the trim + read bias code. Add similar debug to
  the read + writes case.
  
  Spondored by: Netflix

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==============================================================================
--- head/sys/cam/cam_iosched.c  Mon Nov 26 22:45:58 2018        (r341002)
+++ head/sys/cam/cam_iosched.c  Mon Nov 26 22:50:30 2018        (r341003)
@@ -1240,7 +1240,7 @@ cam_iosched_get_write(struct cam_iosched_softc *isc)
                            "Reads present and current_read_bias is %d queued "
                            "writes %d queued reads %d\n",
                            isc->current_read_bias, isc->write_stats.queued,
-                           isc->read_stats.queued);
+                           isc->read_stats.queued);
                isc->current_read_bias--;
                /* We're not limiting writes, per se, just doing reads first */
                return NULL;
@@ -1326,14 +1326,18 @@ cam_iosched_get_trim(struct cam_iosched_softc *isc)
        if (!cam_iosched_has_more_trim(isc))
                return NULL;
 #ifdef CAM_IOSCHED_DYNAMIC
+       /*
+        * If pending read, prefer that based on current read bias setting. The
+        * read bias is shared for both writes and TRIMs, but on TRIMs the bias
+        * is for a combined TRIM not a single TRIM request that's come in.
+        */
        if (do_dynamic_iosched) {
-               /*
-                * If pending read, prefer that based on current read bias
-                * setting. The read bias is shared for both writes and
-                * TRIMs, but on TRIMs the bias is for a combined TRIM
-                * not a single TRIM request that's come in.
-                */
                if (bioq_first(&isc->bio_queue) && isc->current_read_bias) {
+                       if (iosched_debug)
+                               printf("Reads present and current_read_bias is 
%d"
+                                   " queued trims %d queued reads %d\n",
+                                   isc->current_read_bias, 
isc->trim_stats.queued,
+                                   isc->read_stats.queued);
                        isc->current_read_bias--;
                        /* We're not limiting TRIMS, per se, just doing reads 
first */
                        return NULL;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to