From owner-svn-src-head@freebsd.org Thu Feb 22 11:51:51 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 4EA54F262B7; Thu, 22 Feb 2018 11:51:51 +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 0098E7DDD6; Thu, 22 Feb 2018 11:51:51 +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 EF9DE27311; Thu, 22 Feb 2018 11:51:50 +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 w1MBpo7A052133; Thu, 22 Feb 2018 11:51:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1MBpo0W052132; Thu, 22 Feb 2018 11:51:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201802221151.w1MBpo0W052132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 22 Feb 2018 11:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329821 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 329821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Thu, 22 Feb 2018 11:51:51 -0000 Author: imp Date: Thu Feb 22 11:51:50 2018 New Revision: 329821 URL: https://svnweb.freebsd.org/changeset/base/329821 Log: Revert r329814 as well. It should have been in r329819. Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Thu Feb 22 11:41:00 2018 (r329820) +++ head/sys/cam/cam_iosched.c Thu Feb 22 11:51:50 2018 (r329821) @@ -60,19 +60,6 @@ static MALLOC_DEFINE(M_CAMSCHED, "CAM I/O Scheduler", "CAM I/O Scheduler buffers"); /* - * 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) - /* Timer has just ticked */ -#define CAM_IOSCHED_FLAG_TICK (1ul << 2) - - /* Periph drivers set these flags to indicate work */ -#define CAM_IOSCHED_FLAG_WORK_FLAGS ((0xffffu) << 16) - -/* * Default I/O scheduler for FreeBSD. This implementation is just a thin-vineer * over the bioq_* interface, with notions of separate calls for normal I/O and * for trims. @@ -587,7 +574,6 @@ cam_iosched_ticker(void *arg) cam_iosched_limiter_tick(&isc->write_stats); cam_iosched_limiter_tick(&isc->trim_stats); - isc->flags |= CAM_IOSCHED_FLAGS_TICK; cam_iosched_schedule(isc, isc->periph); /* @@ -715,6 +701,17 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp) } #endif +/* + * 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) + + /* Periph drivers set these flags to indicate work */ +#define CAM_IOSCHED_FLAG_WORK_FLAGS ((0xffffu) << 16) + #ifdef CAM_IOSCHED_DYNAMIC static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, @@ -1325,10 +1322,6 @@ struct bio * cam_iosched_next_bio(struct cam_iosched_softc *isc) { struct bio *bp; - bool wastick; - - wastick = !!(isc->flags & CAM_IOSCHED_FLAGS_TICK); - isc->flags &= ~CAM_IOSCHED_FLAGS_TICK; /* * See if we have a trim that can be scheduled. We can only send one