From owner-svn-src-head@freebsd.org Mon Feb 10 05:36:41 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 E3FE222DE55; Mon, 10 Feb 2020 05:36:41 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48GF5N6b8Wz41FT; Mon, 10 Feb 2020 05:36:40 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 11kLjuLHG17ZD11kMjcuSv; Sun, 09 Feb 2020 22:36:39 -0700 X-Authority-Analysis: v=2.3 cv=ZsqT1OzG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=l697ptgUJYAA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=h-IHFASVRak1_FqS7qcA:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 5D22E39A; Sun, 9 Feb 2020 21:36:36 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 01A5aaJe073844; Sun, 9 Feb 2020 21:36:36 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 01A5aakV073830; Sun, 9 Feb 2020 21:36:36 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202002100536.01A5aakV073830@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "O. Hartmann" cc: Scott Long , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs In-reply-to: <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> Comments: In-reply-to "O. Hartmann" message dated "Mon, 10 Feb 2020 06:01:18 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sun, 09 Feb 2020 21:36:35 -0800 X-CMAE-Envelope: MS4wfEAPxBMGojW5Int0+BPxVKL3efhSgw61/+ctwvV5Oi8g6hsECsF0tYDqArUs9CG/coEgs4Lgl27QzBXYSii1nV5BN7c8nsl716oJ9WaCjGxDCHS5wjxO pshbxRc+afwPsC2/f1Fr/4hPg/SgliMFnpOty9+liu+Ppoz04Ea7g4JXhnBm1m5Cw+KONrlSAMUrNt2NzWNAMjFwqeBoI3l4yP4p4D5X1BUHmoaAsh8ks96C g76mIJAXtt1hRI45vjXc5arDa+Oz5tPm0CF796jO9JeyxDd61Z9Xwfr2a8STx9si8VK70XMyUGoU7zYo4FHBYymlAheLmMpcJiX2ZSSaQWc= X-Rspamd-Queue-Id: 48GF5N6b8Wz41FT X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.138) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.13 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[138.136.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.43)[ip: (-6.34), ipnet: 64.59.128.0/20(-3.21), asn: 6327(-2.50), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[] 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:36:42 -0000 In message <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de>, "O. Hartma nn" writes: > -----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 (r35770 > 9) > > +++ head/sys/cam/ata/ata_da.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -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 (r35770 > 9) > > +++ head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -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 (r35770 > 9) > > +++ head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -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 (r35770 > 9) > > +++ head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -1464,6 +1464,9 @@ softdep_send_speedup(struct ufsmount *ump, size_t sho > r > > { > > 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 (r35770 > 9) > > +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -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 h > as any relevance). What does fstab have to mount root? Mine that work use gmirror: /dev/mirror/gm0a / ufs rw 1 1 The machines that hang use: /dev/ada0s1a / ufs rw 1 1 or a disk with a UFS label (essentially the same thing). -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.