From owner-svn-src-head@freebsd.org Thu Feb 22 06:07:22 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 DEE22F055CF; Thu, 22 Feb 2018 06:07:21 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 508106E080; Thu, 22 Feb 2018 06:07:21 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Ld1CS-1eOW2R1EpM-00iC0R; Thu, 22 Feb 2018 07:07:19 +0100 Date: Thu, 22 Feb 2018 07:07:13 +0100 From: "O. Hartmann" To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329814 - head/sys/cam Message-ID: <20180222070713.1ba6f278@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201802220543.w1M5hobv068907@repo.freebsd.org> References: <201802220543.w1M5hobv068907@repo.freebsd.org> Organization: Walstatt MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:1Wg+Kgf9fb4WnwYwRmj6qr9ueyo+okrOvQdmytBS/EIJrsUyPCe 8CkAnTNpUe/aNpSR3xKsvdAty8ppcon7z6lc6kQdfs/G7/H4j9m261R6xFfbNF5ybTcpJdS 9vuraIiR9la8OAAY2RXwqlFbRmxJ9QIvSp/jartG3RJ7BTCXAYUd6RMhPNRgII3bk2LsT21 PNuSSeuN2yS0uYvrNjLsw== X-UI-Out-Filterresults: notjunk:1;V01:K0:33vRepN7faI=:KYsN/+YSuPiDfIrjh/3xzf RnTCPTLnbJZEq2raUha2v2gBaRR/wmI0j+qUodVYe4MTzwYlXhG1+C6VIXvTrdwbsEt65x4BU iUPWTec4vG+ThnhFUEI+7+wzRkf90/cnkBeIMUMKgBN+LY84HkJEoxuT2D34oAk7WJYBZ2YU9 tx6h3IvrhazrtX9SIU23iXHcZ/qBFXKjraoa+gMNKEsFlR92ogWwJLF/0MaZbiQbb4uiezyxJ ZRmlM/KeVTUwO/p0sZ0dudpvx+i8+aZo6V17kc+ZQ/mi8ehUg2AxwmIijBZT5olfkKA4/t+KI awjvO6HZ+TZDcsM7yHpscnPhGUYHJbRTBWZm/e7o1+MwBSJbMSBjNbm+YEX1UeIWR0xjf1Jln IlMWVoApzavyREFMLU0fyWVEyxMcWDDyRdW8/RrDlntXFdwv8nusp34Hv+weRfhTQehSxMF6N jR6p3xsie1qOszA5WBKGXgrkBXtmrTgxQ4VTcbsr3WBn65BYq2ZR+n6Ue2XSBBjRizOnr8Zhm aBeuEyV3voxv5/XiijKV/xU4P4NZYaMwX82T8hQfyMcJqUDaFYVhBvAC1MNPmNya4mRPdUzvR GOBB17eu1V+QjZqnq0GD4zRiEbfTrv0Hm4Rmhzrri2mUzEInhdpH84RDh4ZFjCn/TK9c0e3Ec 1/PiTVkzVrHQxyhV2QFY8V4d57gWAdvPLjGURn+s/o9zKTQA+brZ2dkg6Il34aGZL9e//1/7e NnB8SevxOQaLkUAJhUQVZBs6uwOoRyBWjSPl5iT9qX8VtvP2FYKEq/ZmaKE2vv3on6mhHmbz+ vTyidTirsRk10PUiwwCs3swhrNRXAaVjKV7IfQT9/QUj2j2Itw= 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 06:07:22 -0000 On Thu, 22 Feb 2018 05:43:50 +0000 (UTC) Warner Losh wrote: > Author: imp > Date: Thu Feb 22 05:43:50 2018 > New Revision: 329814 > URL: https://svnweb.freebsd.org/changeset/base/329814 > > Log: > Note when we tick. > > To help implement a policy of 'queue all trims until next I/O sched > tick' policy to help coalesce them, note when we tick so we can do > something special on the first call after the tick to get more work. > > Sponsored by: Netflix > > Modified: > head/sys/cam/cam_iosched.c > > Modified: head/sys/cam/cam_iosched.c > ============================================================================== > --- head/sys/cam/cam_iosched.c Thu Feb 22 05:43:45 2018 > (r329813) +++ head/sys/cam/cam_iosched.c Thu Feb 22 05:43:50 > 2018 (r329814) @@ -60,6 +60,19 @@ 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. > @@ -574,6 +587,7 @@ 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); > > /* > @@ -701,17 +715,6 @@ 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, > @@ -1322,6 +1325,10 @@ 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 > _______________________________________________ > 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-unsubscribe@freebsd.org" A recent buildworld/buildkernel failed with this error just right now: --- cam_iosched.o --- /usr/src/sys/cam/cam_iosched.c:593:16: error: use of undeclared identifier 'CAM_IOSCHED_FLAGS_TICK' isc->flags |= CAM_IOSCHED_FLAGS_TICK;