[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file |
Date: |
Tue, 28 Aug 2012 16:23:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
Il 28/08/2012 15:37, Stefan Hajnoczi ha scritto:
>> > The "right fix" would not be much more complex though, something like
>> > this, right?
>> > (untested).
> Yes but it's more complicated. To do a really good job we should
> slice off the first/last clusters if they are unaligned, handle them
> like regular allocating writes, and handle the middle of the request
> as a zero write.
>
> I decided to do the simplest implementation since this scenario only
> occurs in test cases, not real guests.
Yes, I was curious because it reminded me of the patch I did to write
zeroes when I was playing with discard to avoid the large bounce buffer
in qed_aio_write_inplace. That patch takes care of processing clusters
one by one (though that means one L2 write for each and every cluster,
not just the first and last).
It probably causes a performance hit, but anyway I attach it for
completeness.
Paolo
wz.patch
Description: Text Data