From owner-svn-src-all@freebsd.org Thu Jun 23 23:21:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A01CB73F5F; Thu, 23 Jun 2016 23:21:00 +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 mx1.freebsd.org (Postfix) with ESMTPS id ED3F52F5F; Thu, 23 Jun 2016 23:20:59 +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 u5NNKxFp094248; Thu, 23 Jun 2016 23:20:59 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5NNKwR9094246; Thu, 23 Jun 2016 23:20:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201606232320.u5NNKwR9094246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 23 Jun 2016 23:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302163 - in head/sys: cam conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2016 23:21:00 -0000 Author: imp Date: Thu Jun 23 23:20:58 2016 New Revision: 302163 URL: https://svnweb.freebsd.org/changeset/base/302163 Log: Rename CAM_NETFLIX_IOSCHED to CAM_IOSCHED_DYNAMIC to better reflect its nature. Approved by: re Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D6811 Modified: head/sys/cam/cam_iosched.c head/sys/conf/options Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Thu Jun 23 23:13:14 2016 (r302162) +++ head/sys/cam/cam_iosched.c Thu Jun 23 23:20:58 2016 (r302163) @@ -61,7 +61,7 @@ static MALLOC_DEFINE(M_CAMSCHED, "CAM I/ * for trims. */ -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC static int do_netflix_iosched = 1; TUNABLE_INT("kern.cam.do_netflix_iosched", &do_netflix_iosched); @@ -250,7 +250,7 @@ struct cam_iosched_softc /* scheduler flags < 16, user flags >= 16 */ uint32_t flags; int sort_io_queue; -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC int read_bias; /* Read bias setting */ int current_read_bias; /* Current read bias state */ int total_ticks; @@ -269,7 +269,7 @@ struct cam_iosched_softc #endif }; -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC /* * helper functions to call the limsw functions. */ @@ -624,7 +624,7 @@ cam_iosched_cl_maybe_steer(struct contro /* Periph drivers set these flags to indicate work */ #define CAM_IOSCHED_FLAG_WORK_FLAGS ((0xffffu) << 16) -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, sbintime_t sim_latency, int cmd, size_t size); @@ -639,7 +639,7 @@ cam_iosched_has_flagged_work(struct cam_ static inline int cam_iosched_has_io(struct cam_iosched_softc *isc) { -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (do_netflix_iosched) { struct bio *rbp = bioq_first(&isc->bio_queue); struct bio *wbp = bioq_first(&isc->write_queue); @@ -672,7 +672,7 @@ cam_iosched_has_more_trim(struct cam_ios static inline int cam_iosched_has_work(struct cam_iosched_softc *isc) { -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (iosched_debug > 2) printf("has work: %d %d %d\n", cam_iosched_has_io(isc), cam_iosched_has_more_trim(isc), @@ -684,7 +684,7 @@ cam_iosched_has_work(struct cam_iosched_ cam_iosched_has_flagged_work(isc); } -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC static void cam_iosched_iop_stats_init(struct cam_iosched_softc *isc, struct iop_stats *ios) { @@ -946,14 +946,14 @@ cam_iosched_init(struct cam_iosched_soft *iscp = malloc(sizeof(**iscp), M_CAMSCHED, M_NOWAIT | M_ZERO); if (*iscp == NULL) return ENOMEM; -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (iosched_debug) printf("CAM IOSCHEDULER Allocating entry at %p\n", *iscp); #endif (*iscp)->sort_io_queue = -1; bioq_init(&(*iscp)->bio_queue); bioq_init(&(*iscp)->trim_queue); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (do_netflix_iosched) { bioq_init(&(*iscp)->write_queue); (*iscp)->read_bias = 100; @@ -984,7 +984,7 @@ cam_iosched_fini(struct cam_iosched_soft { if (isc) { cam_iosched_flush(isc, NULL, ENXIO); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC cam_iosched_iop_stats_fini(&isc->read_stats); cam_iosched_iop_stats_fini(&isc->write_stats); cam_iosched_iop_stats_fini(&isc->trim_stats); @@ -1009,7 +1009,7 @@ cam_iosched_fini(struct cam_iosched_soft void cam_iosched_sysctl_init(struct cam_iosched_softc *isc, struct sysctl_ctx_list *ctx, struct sysctl_oid *node) { -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC struct sysctl_oid_list *n; #endif @@ -1018,7 +1018,7 @@ void cam_iosched_sysctl_init(struct cam_ &isc->sort_io_queue, 0, "Sort IO queue to try and optimise disk access patterns"); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (!do_netflix_iosched) return; @@ -1060,13 +1060,13 @@ cam_iosched_flush(struct cam_iosched_sof { bioq_flush(&isc->bio_queue, stp, err); bioq_flush(&isc->trim_queue, stp, err); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (do_netflix_iosched) bioq_flush(&isc->write_queue, stp, err); #endif } -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC static struct bio * cam_iosched_get_write(struct cam_iosched_softc *isc) { @@ -1132,7 +1132,7 @@ void cam_iosched_put_back_trim(struct cam_iosched_softc *isc, struct bio *bp) { bioq_insert_head(&isc->trim_queue, bp); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC isc->trim_stats.queued++; isc->trim_stats.total--; /* since we put it back, don't double count */ isc->trim_stats.pending--; @@ -1155,7 +1155,7 @@ cam_iosched_next_trim(struct cam_iosched if (bp == NULL) return NULL; bioq_remove(&isc->trim_queue, bp); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC isc->trim_stats.queued--; isc->trim_stats.total++; isc->trim_stats.pending++; @@ -1201,7 +1201,7 @@ cam_iosched_next_bio(struct cam_iosched_ if ((bp = cam_iosched_get_trim(isc)) != NULL) return bp; -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC /* * See if we have any pending writes, and room in the queue for them, * and if so, those are next. @@ -1218,7 +1218,7 @@ cam_iosched_next_bio(struct cam_iosched_ if ((bp = bioq_first(&isc->bio_queue)) == NULL) return NULL; -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC /* * For the netflix scheduler, bio_queue is only for reads, so enforce * the limits here. Enforce only for reads. @@ -1230,7 +1230,7 @@ cam_iosched_next_bio(struct cam_iosched_ } #endif bioq_remove(&isc->bio_queue, bp); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (do_netflix_iosched) { if (bp->bio_cmd == BIO_READ) { isc->read_stats.queued--; @@ -1262,12 +1262,12 @@ cam_iosched_queue_work(struct cam_iosche */ if (bp->bio_cmd == BIO_DELETE) { bioq_disksort(&isc->trim_queue, bp); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC isc->trim_stats.in++; isc->trim_stats.queued++; #endif } -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC else if (do_netflix_iosched && (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH)) { if (cam_iosched_sort_queue(isc)) @@ -1287,7 +1287,7 @@ cam_iosched_queue_work(struct cam_iosche bioq_disksort(&isc->bio_queue, bp); else bioq_insert_tail(&isc->bio_queue, bp); -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (iosched_debug > 9) printf("Qr : %p %#x\n", bp, bp->bio_cmd); if (bp->bio_cmd == BIO_READ) { @@ -1331,7 +1331,7 @@ cam_iosched_bio_complete(struct cam_iosc union ccb *done_ccb) { int retval = 0; -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC if (!do_netflix_iosched) return retval; @@ -1399,7 +1399,7 @@ cam_iosched_clr_work_flags(struct cam_io isc->flags &= ~flags; } -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC /* * After the method presented in Jack Crenshaw's 1998 article "Integer * Suqare Roots," reprinted at @@ -1523,7 +1523,7 @@ cam_iosched_update(struct iop_stats *iop iop->sd = (int64_t)var < 0 ? 0 : isqrt64(var); } -#ifdef CAM_NETFLIX_IOSCHED +#ifdef CAM_IOSCHED_DYNAMIC static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, sbintime_t sim_latency, int cmd, size_t size) Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Jun 23 23:13:14 2016 (r302162) +++ head/sys/conf/options Thu Jun 23 23:20:58 2016 (r302163) @@ -330,7 +330,7 @@ CAM_DEBUG_TARGET opt_cam.h CAM_DEBUG_LUN opt_cam.h CAM_DEBUG_FLAGS opt_cam.h CAM_BOOT_DELAY opt_cam.h -CAM_NETFLIX_IOSCHED opt_cam.h +CAM_IOSCHED_DYNAMIC opt_cam.h SCSI_DELAY opt_scsi.h SCSI_NO_SENSE_STRINGS opt_scsi.h SCSI_NO_OP_STRINGS opt_scsi.h