From owner-svn-src-head@freebsd.org Fri Aug 19 14:13:51 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 23FDABBE4EE for ; Fri, 19 Aug 2016 14:13:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 E0DA419A0 for ; Fri, 19 Aug 2016 14:13:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22c.google.com with SMTP id b62so49261962iod.3 for ; Fri, 19 Aug 2016 07:13:49 -0700 (PDT) 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:content-transfer-encoding; bh=i/l9y0cd+WJ0StxFQT7PRdsgnq1drneC5zZXUyUN4EI=; b=h3VI5Z15zKUhIuFHcB604BR38Y6impG5WVCTwG6h3jxnuPA+R9OFt8iEPkCYQpDqHT Q0X/KMODso2LganiDn3eyH6f/yo3Z6MN3O+z9L+e/5WN8DQgzJ+zPhSxBvsdoUHPf3Hu GB9e+gjD9G8dTXN9JWRJ4HsR9RzVGBNgkOtR/vWWJIOSy9mnpBOdF4CBsxwgN06FCv55 dzk3VcPCIjA3NODSY0ZNWVzwmTHCXuZClRgGwNDYqdvE3YJ6TA/vIFCqf0q3C5J0471B /Vfiz019zx9kuFog53DWEfkVcnLyBQkIsdKFUhFs4Fri+o45tHi0/QdH9QumcHn/lSil Uo6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=i/l9y0cd+WJ0StxFQT7PRdsgnq1drneC5zZXUyUN4EI=; b=Q8jNZOk8Efp/4ud5R3QCZOKWfESoISVcekP4HPySTt8NljnwOlzCiB52tZcGhuT5+K d0AZO6tohpEixeRTYYWY6ch8K6VXKUuzU9Q3NjleVTGr6EhMExT96mrmQt7xrF16hJv4 yMY6whGJUGXWA6aj4q0Fazp75mjhn9DkdhAv8WB2IfHVTXw98yT2F0JjCJfzmQeQ0oNE ZMca7eUOA4gKgPVpGDfc0vgt8UT/6WMzJUaOGzz1uFUlZ1F4l8P3r4R0RWhYoHrl+HaI 0YPX6Q3IegezdaPz4wRW53O6rqrhDGFEBCZ6OxrBe39TzyG21nYV4iiC57dsyBTMZw+k SL/A== X-Gm-Message-State: AEkoousOKUEac4LmH6frR2o3pmfi4hiUTGF4PRgKd2ODtkRpDb2+PC195TH0xzBsVhi2LppHk9V+z/dbv4sqbA== X-Received: by 10.107.145.214 with SMTP id t205mr9727255iod.135.1471616029242; Fri, 19 Aug 2016 07:13:49 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Fri, 19 Aug 2016 07:13:48 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <86inuxckve.fsf@desk.des.no> 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> From: Warner Losh Date: Fri, 19 Aug 2016 08:13:48 -0600 X-Google-Sender-Auth: -ojWIqbLySqMO4LZPvT22rT1mWY Message-ID: Subject: Re: svn commit: r304142 - head/usr.sbin/bsdinstall/partedit To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: Allan Jude , Nathan Whitehorn , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 14:13:51 -0000 On Fri, Aug 19, 2016 at 12:51 AM, Dag-Erling Sm=C3=B8rgrav wro= te: > 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 i= t >> > 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 c= an >> > set 4096 if they use only 4k devices. (doesn't really solve the proble= m >> > 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 took a look into the implications of doing a 4k stripesize 'automatically= ' 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. > 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. 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 size means too many other things to have it be useful in that context. Warner