On 03/09/2010 05:22 PM, Luiz Capitulino wrote:
On Tue, 09 Mar 2010 17:08:33 -0600
Anthony Liguori<anth...@codemonkey.ws> wrote:
On 03/09/2010 04:53 PM, Luiz Capitulino wrote:
Hi,
This series is based on a previous series submitted by Uri Lublin:
http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00864.html
Details on the patches, except for this question: does it make sense to have
a 'low' watermark for block devices?
I think it doesn't, then the event (and the monitor accompanying command)
should be called BLOCK_HIGH_WATERMARK. But this makes the event very
unflexible, so I have called it BLOCK_WATERMARK and added parameters for the
high/low watermark type.
The alternative way to implement this is for a management tool to just
poll the allocated disk size periodically.
It's no more/less safe than generating an event on a "watermark" because
the event is still racy with respect to a guest that's writing very
quickly to the disk.
The argument against polling is not only about possible races, but
it's something very inefficient to do as the condition you're polling
for may never happen but you're wasting cpu resources for it.
No, you just move the polling into qemu in the block I/O path. It's now
"polling" for whether a watermark has been hit.
The problem with this functionality is that it's extremely tied to a
very specific management policy. It's not at all generic.
Polling is an entirely legitimate thing for a management tool to do and
we shouldn't introduce events that don't make sense just to avoid polling.
Regards,
Anthony Liguori