From owner-svn-src-head@freebsd.org Mon Nov 26 22:50:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ECFA1147878; Mon, 26 Nov 2018 22:50:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C954D6F73D; Mon, 26 Nov 2018 22:50:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB8AF12528; Mon, 26 Nov 2018 22:50:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQMoUAT079235; Mon, 26 Nov 2018 22:50:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQMoUbP079234; Mon, 26 Nov 2018 22:50:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201811262250.wAQMoUbP079234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 26 Nov 2018 22:50:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341003 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 341003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C954D6F73D X-Spamd-Result: default: False [1.51 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.30)[0.302,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_SPAM_LONG(0.64)[0.643,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 22:50:31 -0000 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;