From owner-svn-src-all@freebsd.org Thu Feb 22 11:56:05 2018 Return-Path: Delivered-To: svn-src-all@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 98739F2673C for ; Thu, 22 Feb 2018 11:56:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (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 276C27E0D7 for ; Thu, 22 Feb 2018 11:56:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x232.google.com with SMTP id z6so5723400iob.11 for ; Thu, 22 Feb 2018 03:56:05 -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=ammovNOEXAASkYq6AqvmKpePluVcKE3hQmVv2oPQD2g=; b=CvsEKPlNqGWqyQXC7ny3H3fpWFTYPCxsxrqGgVXlfEcAgKffrbSkeK4vnmdHDVElAJ /UvCrpMK2CrN3fYOZR63HQQFtgpI3iBeP37FNdNDudLU+7edoqgIv2mAXT1ZJ9HoPX6y BEkrJX8uRvxpXmKd6l6G1eR3MI+9+tH7ycHJ/hp+FeImY0FBXc82oZ9Atubgi3GC2bjh MT30qk1BWSSBEUyALYI8D8Fbrkv37bdfl+PNgn/n94g5GseS9CdzLll5WWFhoyji3lrS 1u5FFeNAGQ3BcAilFxZOzkoGKtpS2NtE0JXrmXFT37Vpnl9tOyl1Zd+4uz3I1yoHa3qE pB1g== 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=ammovNOEXAASkYq6AqvmKpePluVcKE3hQmVv2oPQD2g=; b=bEnQnW9+UEulAz6Nvm2Hna29U0bzfd3QxxRXeVKGROZaqu7REML4ZaY4/b1z3frNcI s6eS7yfd1uX3I25dVa+pz78U4q9a7BSPuOes6F3EUSjFOdAhMZtBCsFv02rQYN8LDpjK tCTp1+pXig7ktYAXz54Qkj1fflO2vhaOMT6th7E1vwLBZTan3FTCixxEZHgjAXj8UWbQ wnwQqv7imvoPmn2QqH1E7bJ5PKO2mDHovAyz7sYO2zPXs6cDaQ8aN6WADyU67+1d/OfJ G9+I+npruPW7gUcJI33ItbBchIX+xpY96rplO52+A7w4ibtiIuQCSGvv3efgNZGU4/Q3 XYRA== X-Gm-Message-State: APf1xPAZZAKqADjZj/p1j2q2S7VkG8CnSM5f9Gr7PfxLg9R42QIgl/gI Wm/p7ZuqDEdU13KrIuYO9f38eD5PwiK4p+reehAjBw== X-Google-Smtp-Source: AH8x227N9KlNiPJvKm++aXGKMrahN4cGdX3WnaSQBtk0b9Pigqw1jtOfaA7Y2VfI+t4ohr+ORIn5+hfZhvv3DFlu95Q= X-Received: by 10.107.188.65 with SMTP id m62mr8018346iof.39.1519300564384; Thu, 22 Feb 2018 03:56:04 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.201.67 with HTTP; Thu, 22 Feb 2018 03:56:03 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:b10f:802c:cf9a:71e3] Received: by 10.79.201.67 with HTTP; Thu, 22 Feb 2018 03:56:03 -0800 (PST) In-Reply-To: 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 04:56:03 -0700 X-Google-Sender-Auth: m4IOOIgh8uiBRcH6wVjMvY34tJI 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-all@freebsd.org X-Mailman-Version: 2.1.25 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, 22 Feb 2018 11:56:05 -0000 On Feb 22, 2018 3:57 AM, "Warner Losh" wrote: 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... Something is not right with the series. Backing out and will recommit when its sorted out. Warner