|
From: | Denis V. Lunev |
Subject: | Re: [Qemu-block] [PATCH 1/1] block: ignore flush requests when storage is clean |
Date: | Tue, 21 Jun 2016 10:41:18 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
On 06/21/2016 10:32 AM, Paolo Bonzini wrote:
On 20/06/2016 17:19, Denis V. Lunev wrote:+ /* Check if storage is actually dirty before flushing to disk */ + if (!bs->dirty) { + goto flush_parent; + } + bs->dirty = false; +This should be cleared after the flush is complete. If you have write begin write end flush #1 begin flush #2 begin Then the second flush must only return after the first has finished. Paolo
Really interesting point, I have missed it. Though this case is exactly one which we want to optimize. 2nd flush is unnecessary and should not be sent, BUT you perfectly correct it must return later than the first to the guest. Have to rework. Nice catch! Den
[Prev in Thread] | Current Thread | [Next in Thread] |