From owner-svn-src-all@freebsd.org Fri Aug 19 06:52:29 2016 Return-Path: Delivered-To: svn-src-all@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 395E4BBF813; Fri, 19 Aug 2016 06:52:29 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id EE3E51181; Fri, 19 Aug 2016 06:52:28 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 32E5F496D; Fri, 19 Aug 2016 06:52:27 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 1E18B8FF3; Fri, 19 Aug 2016 08:51:01 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Warner Losh Cc: Allan Jude , Nathan Whitehorn , src-committers , "svn-src-all\@freebsd.org" , "svn-src-head\@freebsd.org" 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> Date: Fri, 19 Aug 2016 08:51:01 +0200 In-Reply-To: (Warner Losh's message of "Thu, 18 Aug 2016 22:15:12 -0600") Message-ID: <86inuxckve.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Fri, 19 Aug 2016 06:52:29 -0000 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 problem > > 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 down 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. 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 disk 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 huge performance impact of misaligned partitions on AF disks, but despite what Nathan claims, I never advocated applying the same logic everywhere. [*] Apart from audio CDs. We already know that it will break those. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no