Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2016 08:51:01 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Allan Jude <allanjude@freebsd.org>, Nathan Whitehorn <nwhitehorn@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all\@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head\@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r304142 - head/usr.sbin/bsdinstall/partedit
Message-ID:  <86inuxckve.fsf@desk.des.no>
In-Reply-To: <CANCZdfrGhFTR5sbKRiehXQhhexX=KfW920NJJg0Je=yigqEyEA@mail.gmail.com> (Warner Losh's message of "Thu, 18 Aug 2016 22:15:12 -0600")
References:  <201608150930.u7F9UL1V069576@repo.freebsd.org> <e3454e8e-5d98-5bec-21de-8ea0db2b9b08@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> <b96c3f91-faaa-2552-b4da-2d0d382461af@freebsd.org> <86fuq24d8s.fsf@desk.des.no> <2f9fb04c-7ec4-be40-8fcb-0cf74bb56859@freebsd.org> <CANCZdfrGhFTR5sbKRiehXQhhexX=KfW920NJJg0Je=yigqEyEA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh <imp@bsdimp.com> writes:
> Allan Jude <allanjude@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86inuxckve.fsf>