Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2017 21:13:20 +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: r323828 - head/sys/cam
Message-ID:  <201709202113.v8KLDKbx053535@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Wed Sep 20 21:13:20 2017
New Revision: 323828
URL: https://svnweb.freebsd.org/changeset/base/323828

Log:
  cam iosched: Use the write queue for BIO_ZONE commands
  
  Use the write queue for BIO_ZONE commands so they can't get executed
  ahead of writes that were sent after them. More generally, since they
  introduce strong ordering into the list, they need to go to the write
  queue (which is the only queue that BIO_ORDERED is honored for at the
  moment). In fact, fix mismatch between queueing and dequeueing code by
  changing this to queue all non-reads (and non-trims) to the write
  queue.
  
  As a side effect this prevents the kernel message:
  kernel: Found bio_cmd = 0x9
  which cam_iosched_next_bio() emits when finding commands
  other than BIO_READ in the read queue.
  
  PR: 221973
  Obtained from: ElectroBSD
  Submitted by: Fabian Keil
  Differential Revision: https://reviews.freebsd.org/D12353

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==============================================================================
--- head/sys/cam/cam_iosched.c	Wed Sep 20 20:59:28 2017	(r323827)
+++ head/sys/cam/cam_iosched.c	Wed Sep 20 21:13:20 2017	(r323828)
@@ -1345,8 +1345,7 @@ cam_iosched_queue_work(struct cam_iosched_softc *isc, 
 #endif
 	}
 #ifdef CAM_IOSCHED_DYNAMIC
-	else if (do_dynamic_iosched &&
-	    (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH)) {
+	else if (do_dynamic_iosched && (bp->bio_cmd != BIO_READ)) {
 		if (cam_iosched_sort_queue(isc))
 			bioq_disksort(&isc->write_queue, bp);
 		else



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