Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-21 Thread Eric Blake
On 11/21/2014 01:43 AM, Francesco Romani wrote: > A couple of specific questions more, mostly to make sure I can do meaningful > tests for my next submission: > > 1. I'm running a simple test using the attached script - > which is a qemu command line adapted from libvirt ouput driven > by oVirt.

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-21 Thread Francesco Romani
- Original Message - > From: "Kevin Wolf" > To: "Francesco Romani" > Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" , > mdr...@linux.vnet.ibm.com, "Luiz Capitulino" > , "Stefan Hajnoczi" > Sent: Friday, November 21, 201

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-21 Thread Kevin Wolf
org, > > "Francesco Romani" > > Sent: Thursday, November 20, 2014 12:34:28 PM > > Subject: Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold > > reporting for block devices > > > > > > One way to solve this is to require that the mana

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-21 Thread Francesco Romani
34:28 PM > Subject: Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold > reporting for block devices > > > > One way to solve this is to require that the management tool tells QEMU > > > > which exact BlockDriverState node the threshold applies to. T

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Eric Blake
On 11/20/2014 04:04 AM, Stefan Hajnoczi wrote: >> >> We're "only" talking about an optimisation here, even though a very >> useful one, so I wouldn't easily make compromises here. We should >> probably insist on using the node-name. Management tools need new code >> anyway to make use of the new fu

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Kevin Wolf
Am 20.11.2014 um 12:04 hat Stefan Hajnoczi geschrieben: > On Thu, Nov 20, 2014 at 11:30:53AM +0100, Kevin Wolf wrote: > > Am 17.11.2014 um 17:49 hat Stefan Hajnoczi geschrieben: > > > On Fri, Nov 07, 2014 at 02:12:13PM +0100, Francesco Romani wrote: > > > > +void bdrv_set_usage_threshold(BlockDrive

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Stefan Hajnoczi
On Thu, Nov 20, 2014 at 11:30:53AM +0100, Kevin Wolf wrote: > Am 17.11.2014 um 17:49 hat Stefan Hajnoczi geschrieben: > > On Fri, Nov 07, 2014 at 02:12:13PM +0100, Francesco Romani wrote: > > > +void bdrv_set_usage_threshold(BlockDriverState *bs, int64_t > > > threshold_bytes) > > > +{ > > > +

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Kevin Wolf
Am 17.11.2014 um 17:49 hat Stefan Hajnoczi geschrieben: > On Fri, Nov 07, 2014 at 02:12:13PM +0100, Francesco Romani wrote: > > +void bdrv_set_usage_threshold(BlockDriverState *bs, int64_t > > threshold_bytes) > > +{ > > +BlockDriverState *target_bs = bs; > > +if (bs->file) { > > +

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-20 Thread Francesco Romani
51 PM > Subject: Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold > reporting for block devices > > On Tue, Nov 18, 2014 at 03:12:12AM -0500, Francesco Romani wrote: > > > > +static int coroutine_fn before_write_notify(NotifierWithReturn > > &g

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-19 Thread Stefan Hajnoczi
On Tue, Nov 18, 2014 at 03:12:12AM -0500, Francesco Romani wrote: > > > +static int coroutine_fn before_write_notify(NotifierWithReturn *notifier, > > > +void *opaque) > > > +{ > > > +BdrvTrackedRequest *req = opaque; > > > +BlockDriverState *bs =

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-18 Thread Francesco Romani
Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold > reporting for block devices > > On Fri, Nov 07, 2014 at 02:12:13PM +0100, Francesco Romani wrote: > > Sorry for the long review delay. Looks pretty good, just one real issue > to think about at the bottom. Hi St

Re: [Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-17 Thread Stefan Hajnoczi
On Fri, Nov 07, 2014 at 02:12:13PM +0100, Francesco Romani wrote: Sorry for the long review delay. Looks pretty good, just one real issue to think about at the bottom. > +static void usage_threshold_disable(BlockDriverState *bs) > +{ It would be safest to make this idempotent: if (!usage_thres

[Qemu-devel] [RFC][PATCH v2] block: add write threshold reporting for block devices

2014-11-07 Thread Francesco Romani
Managing applications, like oVirt (http://www.ovirt.org), make extensive use of thin-provisioned disk images. To let the guest run smoothly and be not unnecessarily paused, oVirt sets a disk usage threshold (so called 'high water mark') based on the occupation of the device, and automatically exte