From owner-svn-src-head@freebsd.org Mon Feb 10 05:14:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FC2122D011; Mon, 10 Feb 2020 05:14:57 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yw1-f68.google.com (mail-yw1-f68.google.com [209.85.161.68]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48GDcJ0dgvz400K; Mon, 10 Feb 2020 05:14:55 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yw1-f68.google.com with SMTP id l5so2949126ywd.4; Sun, 09 Feb 2020 21:14:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZuHbJQMCyvMBpduqGbf6qcwaXaT2UWwQhnGzcf4+wdQ=; b=UvGzBpZYt0COH3b9njUs/8jHZ9txzQJtWhIVivn1Q2x5tVE8hcQR49IzhFTtoLymCJ deM361aoyXpDrFiJKxaABvZKYvHXGnMSJ2s2R0MfWKk2cCHIB26I9/IHwznVe/6NFSVC piLhgf1JCvKzk7WcIeatEBHCTR+DpBOwNvRwWfAwNBWQlypwXYhFThEAoSB4BQblSRjD NY40x9D7KmBe3uQTcCOWbkLJ6IK+NmVytzoUpkApACwCtf+lvVneesfClsAETArRvquF 39WBI3dcRDCcaW7BLARY1InLi1OA14MWEXbuGv34D0RjOQ4VoBbELr8jyxPQn+CUtqTU Cr2g== X-Gm-Message-State: APjAAAWvCgo5fPMiiII3MNk48tDLUGx9765WGR7d/4bBNNZ9TXmnlj1f gYHjLHvN5k8/Zxzo6hKh4o0UtgGn7axZEv7BOPiAc+0P X-Google-Smtp-Source: APXvYqyUOJSSlxgxrc2qqoE4UM25aecSgU6nfGu6vzm9jWYkF3nw2TQtts+JEQT3a43Rr4kqQc1lqfiriQAx7Gct824= X-Received: by 2002:a0d:ce02:: with SMTP id q2mr9469675ywd.400.1581311694827; Sun, 09 Feb 2020 21:14:54 -0800 (PST) MIME-Version: 1.0 References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> From: Li-Wen Hsu Date: Mon, 10 Feb 2020 13:14:42 +0800 Message-ID: Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs To: "O. Hartmann" Cc: Scott Long , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48GDcJ0dgvz400K X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of lwhsufreebsd@gmail.com designates 209.85.161.68 as permitted sender) smtp.mailfrom=lwhsufreebsd@gmail.com X-Spamd-Result: default: False [-3.08 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_NEQ_ENVFROM(0.00)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[68.161.85.209.rep.mailspike.net : 127.0.0.18]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[68.161.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.08)[ip: (-0.60), ipnet: 209.85.128.0/17(-3.02), asn: 15169(-1.73), country: US(-0.05)]; FORGED_SENDER(0.30)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Mon, 10 Feb 2020 05:14:57 -0000 On Mon, Feb 10, 2020 at 1:02 PM O. Hartmann wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Am Mon, 10 Feb 2020 00:23:20 +0000 (UTC) > Scott Long schrieb: > > > Author: scottl > > Date: Mon Feb 10 00:23:20 2020 > > New Revision: 357710 > > URL: https://svnweb.freebsd.org/changeset/base/357710 > > > > Log: > > Add rudamentary support for UFS to probe whether a block device supports the > > BIO_SPEEDUP command. Add complimentary support to the CAM periphs that > > support it. > > > > Modified: > > head/sys/cam/ata/ata_da.c > > head/sys/cam/nvme/nvme_da.c > > head/sys/cam/scsi/scsi_da.c > > head/sys/ufs/ffs/ffs_softdep.c > > head/sys/ufs/ffs/ffs_vfsops.c > > > > Modified: head/sys/cam/ata/ata_da.c > > ============================================================================== > > --- head/sys/cam/ata/ata_da.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/cam/ata/ata_da.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > #include > > #endif /* _KERNEL */ > > > > @@ -1565,6 +1566,10 @@ adagetattr(struct bio *bp) > > { > > int ret; > > struct cam_periph *periph; > > + > > + /* TODO: tunable knob */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > > > Modified: head/sys/cam/nvme/nvme_da.c > > ============================================================================== > > --- head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > #include > > #endif /* _KERNEL */ > > > > @@ -699,6 +700,10 @@ ndagetattr(struct bio *bp) > > { > > int ret; > > struct cam_periph *periph; > > + > > + /* TODO: tunable knob */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > > > Modified: head/sys/cam/scsi/scsi_da.c > > ============================================================================== > > --- head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -1942,6 +1942,10 @@ dagetattr(struct bio *bp) > > int ret; > > struct cam_periph *periph; > > > > + /* TODO: tunable knob for this */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > + > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, > > > > Modified: head/sys/ufs/ffs/ffs_softdep.c > > ============================================================================== > > --- head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -1464,6 +1464,9 @@ softdep_send_speedup(struct ufsmount *ump, size_t shor > > { > > struct buf *bp; > > > > + if ((ump->um_flags & UM_CANSPEEDUP) == 0) > > + return; > > + > > bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO); > > bp->b_iocmd = BIO_SPEEDUP; > > bp->b_ioflags = flags; > > > > Modified: head/sys/ufs/ffs/ffs_vfsops.c > > ============================================================================== > > --- head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -794,7 +794,7 @@ ffs_mountfs(devvp, mp, td) > > struct ucred *cred; > > struct g_consumer *cp; > > struct mount *nmp; > > - int candelete; > > + int candelete, canspeedup; > > off_t loc; > > > > fs = NULL; > > @@ -1009,6 +1009,13 @@ ffs_mountfs(devvp, mp, td) > > ump->um_trimhash = hashinit(MAXTRIMIO, M_TRIM, > > &ump->um_trimlisthashsize); > > } > > + } > > + > > + /* TODO: sysctl tunables, runtime modification */ > > + len = sizeof(int); > > + if (g_io_getattr("GEOM::canspeedup", cp, &len, &canspeedup) == 0) { > > + if (canspeedup) > > + ump->um_flags |= UM_CANSPEEDUP; > > } > > > > ump->um_mountp = mp; > > _______________________________________________ > > 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" > > It seems that this commit makes our systems to hang at the point, when trying to mount the > root partition, last seen message on console is: > > [...] > mountroot: waiting for device /dev/gpt/root... > > > The root partitions on those systems resides on UFS2 formated SSDs (if this has any relevance). The test in the CI seems also handing because of this. The full backtrace is available at: https://ci.freebsd.org/job/FreeBSD-head-i386-test/8396/console The changes in the same build are r357709 and r357710. The previous is arm only change so it seems less suspicious. Please help checking this. Thanks. Li-Wen