qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/5] blockdev: enable discard by default


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 4/5] blockdev: enable discard by default
Date: Wed, 20 Feb 2013 15:18:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

Il 20/02/2013 15:13, Kevin Wolf ha scritto:
> On Fri, Feb 08, 2013 at 02:06:14PM +0100, Paolo Bonzini wrote:
>> Because discard is now a host parameter, we can always fake it as enabled
>> in the guest.  This is an extension of the current choice to ignore
>> "not supported" errors from the host when discard_granularity is set
>> to nonzero.
>>
>> The default granularity is set to the logical block size or 4k, whichever
>> is largest, because cluster sizes below 4k are rarely used and 4K is a
>> typical block size for files.
>>
>> Signed-off-by: Paolo Bonzini <address@hidden>
> 
> I wonder if it would make sense to default to 64k so that a qcow2 image
> with default options can make use of it. On the other hand, it might
> just mean that discard requests are already dropped in the guest kernel
> instead of qemu, then we don't really win much.

In theory it might provide better alignment, but only if we set a
"maximum unmap length" in the block limits VPD page.  Since we don't,
there should be no difference.

Luckily this is just a guest visible parameter and can be versioned in
the machine types, so it's not "another cache=writethrough" that took
years to correct.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]