[parted-devel] [PATCH] libparted: fix optimal IO alignment

Phillip Susi psusi at ubuntu.com
Tue Mar 6 02:17:54 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/01/2012 12:50 PM, Jim Meyering wrote:
>
> Hi Phillip,
>
> Can you describe, or better still, tell me how to demonstrate the
> problem this is fixing?  Or can you at least give a few details, like
> which kernel you used, which command invoked and which values you got
> for the two *_io variables?

I have a server with a 4 disk mdadm raid5 that has an optimal value of 
1.5 MiB as a result of the 512k stripe factor.  The current default 
stripe factor is 512k but it used to be 64k.  If you used a 64k stripe 
factor that would give an optimal value of 192k with a 4 disk raid5.

> I think your description was somehow negated, since it's the reverse
> actually: it accepts a nonzero kernel alignment A only if 2^20 % A == 0.
> I.e., that requires A<= 1024^2.  A kernel alignment value larger
> than 1024^2 is ignored.

You are right, the comment was wrong.  Try this instead:

There were several apparently incorrect tests that would cause the 
kernel supplied optimal io size to be discarded in favor of the default 
1 MiB alignment.  As written, it would only accept values less than the 
parted default ( 1 MiB ) that were also an even power of two.  For 
example, 128k or 512k would be accepted, but 192k or 1.5 MiB would be 
ignored.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPVXPSAAoJEJrBOlT6nu75r5gIAKGcTdC9K56OqRL5LreQN/2m
xDAjinieAMH5DNHMiYGflvQUOch2w02UIkYZZJFm+rloWr4APAokNYPRAvQoDGh8
ZajuWsvrcCJWRgkg2umuZRP0gOpsa7ZDUfOfYESR4AR4VgXUSfTmtcW4KFaVSuD0
0sLyYYlV17Vp28H12AQVn/5qynmM1k/JzU3CsTElWLAV0lB4Wx7B9HO/uvYbIO7H
c6sg6gwHFoBTmhUWr01Ldx+6yhj3BucspSCpP1mJmGEUhHX92rgz5UN6xd2k01+v
pdT8sYkHQNlLBFB0CHthhCSBRoErb0HIjF3ipGEnoLXtfh7TxMO1szoFVILcGq0=
=Cekr
-----END PGP SIGNATURE-----



More information about the parted-devel mailing list