[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH v3 2/5] doc: Fix requirement on preferred size



On 03/29/2018 07:36 AM, Wouter Verhelst wrote:
On Wed, Mar 28, 2018 at 02:43:27PM -0500, Eric Blake wrote:
Setting the preferred size to >= min(min_size, 4k) doesn't make
sense (a preferred size of 4k when min_size is 64k means that
you get efficient I/O when requesting something smaller than
the minimum granularity?).  Fix it by documenting the intended
semantics that the preferred size is >= max(min_size, 4k).

Thanks, that does seem like an improvement.

Side note: there are still hard disks out there which use 512-byte
blocks[1]. It would make sense for an nbd server exporting a raw hard
disk with 512-byte blocks to use that as the preferred size.

What was the reasoning we used originally for clamping that to 4k at
minimum?

I'm not sure if we had a strong reason, other than 512-byte alignment tends not to be optimal these days. Shall I tweak this to lower pref_size >= max(min_size, 512), while documenting that 4k or larger tends to be more usual?

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply to: