From owner-svn-src-head@freebsd.org Thu Feb 22 10:57:12 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 7CE6BF2193C for ; Thu, 22 Feb 2018 10:57:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 170E47B0CD for ; Thu, 22 Feb 2018 10:57:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x235.google.com with SMTP id n7so5769277ita.5 for ; Thu, 22 Feb 2018 02:57:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=uceNEP8G8BGYDO28EUW4hKinaPS2L5P6o7qcuA6Ol8A=; b=S+jmVnF6zRsA0m/084jz3qtMoHCb3gS3iSGbiGXf47dD9a9eOfn0YWtzyHL9aqxONY 0TqaLTmdMymyrVbttyPIjUvxKbBW9dJBD5cljgZYFKGjHP2xeIGOiFjkMZRWBZFEeQBG OGUWoZCfY6je7zLYnBzQ1A7kdBUryrPce+PyazdiyHXn4WtxvNxcpSi3vIVwQ5N66fXI KaBXH9BuajP6TRyotZPhi/RJ8urYQOW9J4lzxwJFZI4FxSc9eThs9SBsAoNgn4oXVFm8 2qBQMH9MPwDQFIZfJ/w8mvf6tqPrD0PdHpn/confS6oU6EnbSiLwfRm8DLzBstgBV5YM f6NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=uceNEP8G8BGYDO28EUW4hKinaPS2L5P6o7qcuA6Ol8A=; b=qFRhLd05dCqExdp+XPEncQ8evUQX/ras84ejGltHfo4ic/eQgQpePJ+kcgOpaOdvOl bB/pKjfNeVRuWNoLQ8zIwPIPXXp02vhvCuhb7uH5ZlCmh2vzde4SITo5smeFMs8i8GOX 2ZlJ3Fb0epy0YJpWCTP8x50LTQVeue6whjNPXuvxagTUHhmeHsIamFA3nsChORHfvBwe /Ff9PNXZeUCRthBa+ZJszSUU8fk7542Tt+MtPjrGLAlWNnsTr591WTTCeFoWmTs79qCQ a89C6pNLjNyrhAMiw7lV/jOLcRhuLSgkW+F5jVcAh/MuNC/VdbOJ4kbzQQGDz30zkGp3 qAkQ== X-Gm-Message-State: APf1xPA4n3QXL4W/BYM7qL+B+jiTNvwwZqkdWoc6B+Fkss5nClsKfAOv KDEKDcNW3t9/DufakpOguvc1llu8Ttdoydu5OFQ51Q== X-Google-Smtp-Source: AG47ELuLeOm3BUo8SJRvkRav7o42w61bikALuxuCxjTgxGXKnmScvro+6IhBvF+l2ecOTyCY2YIPRiQxi3ZvwLCZgI0= X-Received: by 10.36.222.2 with SMTP id d2mr7166246itg.1.1519297031263; Thu, 22 Feb 2018 02:57:11 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.201.67 with HTTP; Thu, 22 Feb 2018 02:57:10 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <89a4b962-ca69-4a42-579e-72ae777ef015@freebsd.org> References: <201802220543.w1M5hobv068907@repo.freebsd.org> <20180222070713.1ba6f278@freyja.zeit4.iv.bundesimmobilien.de> <89a4b962-ca69-4a42-579e-72ae777ef015@freebsd.org> From: Warner Losh Date: Thu, 22 Feb 2018 03:57:10 -0700 X-Google-Sender-Auth: _SRskkYoJKIqoSwv_lzLuZn-Uy8 Message-ID: Subject: Re: svn commit: r329814 - head/sys/cam To: Allan Jude Cc: "O. Hartmann" , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 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 10:57:12 -0000 On Thu, Feb 22, 2018 at 12:01 AM, Allan Jude wrote: > On 2018-02-22 01:07, O. Hartmann wrote: > > 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; > > > > Looks like a typo, FLAGS_TICK vs FLAG_TICK > It is. I'm unsure how, but it appears to have snuck in during my final rebasing to current... I had a mix in the middle of development and thought I'd fixed them all... Warner