Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2016 11:57:23 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>, =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@des.no>
Cc:        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:  <c4aa117e-ba9d-92d5-ff65-e18a19fe5e83@freebsd.org>
In-Reply-To: <CANCZdfpggS65JcfTo7bFn_4dutcJ%2Bc%2BQ%2BzbXJwORO2kjan%2BhWA@mail.gmail.com>
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> <86inuxckve.fsf@desk.des.no> <CANCZdfpggS65JcfTo7bFn_4dutcJ%2Bc%2BQ%2BzbXJwORO2kjan%2BhWA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--HBoKUtE0wg8OgvF8HaIeneDahTDhXpNSt
Content-Type: multipart/mixed; boundary="jAP4CfVQqcvQPCnoNDJvL0XrEI6hqrdEk"
From: Allan Jude <allanjude@freebsd.org>
To: Warner Losh <imp@bsdimp.com>, =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?=
 <des@des.no>
Cc: 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>
Message-ID: <c4aa117e-ba9d-92d5-ff65-e18a19fe5e83@freebsd.org>
Subject: Re: svn commit: r304142 - head/usr.sbin/bsdinstall/partedit
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>
 <86inuxckve.fsf@desk.des.no>
 <CANCZdfpggS65JcfTo7bFn_4dutcJ+c+Q+zbXJwORO2kjan+hWA@mail.gmail.com>
In-Reply-To: <CANCZdfpggS65JcfTo7bFn_4dutcJ+c+Q+zbXJwORO2kjan+hWA@mail.gmail.com>

--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 <des@des.no>=
 wrote:
>> 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 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c4aa117e-ba9d-92d5-ff65-e18a19fe5e83>