From owner-svn-src-head@freebsd.org Fri Aug 19 15:57:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF150BBF025; Fri, 19 Aug 2016 15:57:25 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 835B213E0; Fri, 19 Aug 2016 15:57:25 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 6D2161D74; Fri, 19 Aug 2016 15:57:24 +0000 (UTC) Subject: Re: svn commit: r304142 - head/usr.sbin/bsdinstall/partedit To: Warner Losh , =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= References: <201608150930.u7F9UL1V069576@repo.freebsd.org> <861t1n6749.fsf@desk.des.no> <581c856c-826b-529e-c9c6-a397fb679708@freebsd.org> <86wpjf4eun.fsf@desk.des.no> <8cb3fa1a-50cb-e238-d006-b98a628d446d@freebsd.org> <86k2ff4cxs.fsf@desk.des.no> <86fuq24d8s.fsf@desk.des.no> <2f9fb04c-7ec4-be40-8fcb-0cf74bb56859@freebsd.org> <86inuxckve.fsf@desk.des.no> Cc: Nathan Whitehorn , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Allan Jude Message-ID: Date: Fri, 19 Aug 2016 11:57:23 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HBoKUtE0wg8OgvF8HaIeneDahTDhXpNSt" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Fri, 19 Aug 2016 15:57:25 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HBoKUtE0wg8OgvF8HaIeneDahTDhXpNSt Content-Type: multipart/mixed; boundary="jAP4CfVQqcvQPCnoNDJvL0XrEI6hqrdEk" From: Allan Jude To: Warner Losh , =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Cc: Nathan Whitehorn , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-ID: Subject: Re: svn commit: r304142 - head/usr.sbin/bsdinstall/partedit References: <201608150930.u7F9UL1V069576@repo.freebsd.org> <861t1n6749.fsf@desk.des.no> <581c856c-826b-529e-c9c6-a397fb679708@freebsd.org> <86wpjf4eun.fsf@desk.des.no> <8cb3fa1a-50cb-e238-d006-b98a628d446d@freebsd.org> <86k2ff4cxs.fsf@desk.des.no> <86fuq24d8s.fsf@desk.des.no> <2f9fb04c-7ec4-be40-8fcb-0cf74bb56859@freebsd.org> <86inuxckve.fsf@desk.des.no> In-Reply-To: --jAP4CfVQqcvQPCnoNDJvL0XrEI6hqrdEk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-08-19 10:13, Warner Losh wrote: > On Fri, Aug 19, 2016 at 12:51 AM, Dag-Erling Sm=C3=B8rgrav = wrote: >> Warner Losh writes: >>> Allan Jude writes: >>>> Which makes more sense: >>>> >>>> A) If stripesize =3D=3D 0, use some sane value like 4096 >>> >>> I don't like this. >>> >>>> B) Some other combination that uses the reported stripe size, unless= it >>>> is 0, in which case it uses 4096 (or some other value controlled by = a >>>> different new sysctl) >>> >>> Don't like this so much. >>> >>>> C) create kern.geom.min_stripe_size with a default of 512, but users= can >>>> set 4096 if they use only 4k devices. (doesn't really solve the prob= lem >>>> for the installer) >>> >>> Default it to 4k, and allow users to set it to 512. If the drive >>> reports < this value >>> report this value instead. >> >> I don't like either option. Option D (which I don't like either, but >> which should at least work in most cases) is a sysctl that specifies a= >> minimum factor, and set the reported stripe size to the least common >> multiple of that number and the actual stripe or sector size. This is= >> what my bsdinstall patch does. However, I think that pushing this dow= n >> to a layer where it will affect all applications is a terrible idea, >> because we have no way of knowing what will break[*], and it can >> seriously mislead users and hinder troubleshooting - especially if it = is >> enabled by default rather than only when necessary. >=20 > I took a look into the implications of doing a 4k stripesize 'automatic= ally' > this morning. I found a few places in g_part where it would actively > hurt when coupled with gpart's insistence on aligning things. So I > now think it's a bad idea. This will make it harder for FreeBSD to > generate arbitrary disk layouts. And I'm not too sure about what > things like gstripe would report as a result and if this would actually= > interfere if you had a large, but not power of two stripe size. >=20 >> I don't think it's a good idea to enforce stripe alignment everywhere,= >> either. It works for partitions because they are very large relative = to >> the stripe size, and at worst we will waste a few millionths of the di= sk >> on inter-partition gaps, which should only occur between the partition= >> table and the boot partition, and possibly, if the stripe size is very= >> large, between the boot partition and the swap partition. But forcing= >> filesystems to respect the stripe size will lead to no end of trouble,= >> because RAID volumes can have stripe sizes of 16 kB or more. I think = it >> is important to align partitions during installation because of the hu= ge >> performance impact of misaligned partitions on AF disks, but despite >> what Nathan claims, I never advocated applying the same logic >> everywhere. >=20 > Yea, having poked at it for just a little while, I agree. The installer= is the > right place to make sure we don't cross-thread the 4k sectors. Stripe s= ize > means too many other things to have it be useful in that context. >=20 > Warner >=20 Maybe instead we just change gpart to default to 4k alignment, but users can always override with -a 512 or some other value? Then the installer behaves the same as a user typing 'gpart', but we don't mess with the entire geom layer? --=20 Allan Jude --jAP4CfVQqcvQPCnoNDJvL0XrEI6hqrdEk-- --HBoKUtE0wg8OgvF8HaIeneDahTDhXpNSt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJXtyxkAAoJEBmVNT4SmAt+aHsQALZH84SBlTJAX36cnNuq8/vZ Iy/NGS364jYsz/rwT1mTLqaB5e+Iiu9ZCF8dkDocAr9X4EqfuxWKuI0pZoPzxJtI zjgxwuWMU21UoSBffpncK3R/iHw1faz2Xq4lV+IKKyS22U9XJGmr3uC+k6Lu3J2m ja7uFKdVaBSNH0FG4+HygUGyRtL4vUZiAa9whe/u/hgxVv/JQCZTwQ86DTSzjEYz volBGOb1ooiVPBDqm/WP53SJCL/5nSUthMxn2NdK1scD7LlYNKXAS6dC1Lgf942c KSZ9c+noIppz/OQovkmGzCepRKvcWSHm+NIcEVXCrFj8oaVH8ys8/i9DMPhDbdD+ CeIpOTYB+yiGFCiWp07y5yTLtOAcH1873zoy/yB6iNadSuCVgKDvqO3dEe1cEJcL O7cl2lOoWJwYHRbfZuPvATc4X91suhO0KQfZJ9+GeXpUIrvl/TCXMFYrRfM+8nPK hK4bdvLVrmSOS1eiU0cZIIvrxgJ1mjtHARW9sBBLVowN+gJ1lQ8U+u93PFfncJ7K YQ+m0/s8AGg406uud68H5Xn9I1FdYBXDoT+P1iayiqFJ7mEllFgaxpH5zlzWODZT KImo0lDRly2DcGcgyWDsFxYjSvPtDnbTdc0zntMCHXblH2ZoAdutil00mD/SJGya TssJryhudabz40FIFTXR =3kd0 -----END PGP SIGNATURE----- --HBoKUtE0wg8OgvF8HaIeneDahTDhXpNSt--