Re: [Qemu-devel] [PATCH V5] fsdev: add IO throttle support to fsdev devices

2016-10-21 Thread Pradeep Jagadeesh
Alberto, Thanks for reviewing the patch. On Thu 20 Oct 2016 04:14:23 PM CEST, Pradeep Jagadeesh wrote: +static void fsdev_throttle_schedule_next_request(FsThrottle *fst, bool is_write) +{ +bool must_wait; + +if (qemu_co_queue_empty(&fst->throttled_reqs[is_write])) { +return; +

Re: [Qemu-devel] [PATCH V5] fsdev: add IO throttle support to fsdev devices

2016-10-21 Thread Alberto Garcia
On Fri 21 Oct 2016 05:02:29 PM CEST, Alberto Garcia wrote: >> +void fsdev_throttle_request(FsThrottle *fst, bool is_write, >> +struct iovec *iov, int iovcnt) > > First, mark the function as running in a coroutine context: > > void coroutine_fn fsdev_throttle_request(FsTh

Re: [Qemu-devel] [PATCH V5] fsdev: add IO throttle support to fsdev devices

2016-10-21 Thread Alberto Garcia
On Thu 20 Oct 2016 04:14:23 PM CEST, Pradeep Jagadeesh wrote: > +static void fsdev_throttle_schedule_next_request(FsThrottle *fst, bool > is_write) > +{ > +bool must_wait; > + > +if (qemu_co_queue_empty(&fst->throttled_reqs[is_write])) { > +return; > +} > +must_wait = fsdev

[Qemu-devel] [PATCH V5] fsdev: add IO throttle support to fsdev devices

2016-10-20 Thread Pradeep Jagadeesh
Signed-off-by: Pradeep Jagadeesh --- fsdev/Makefile.objs | 1 + fsdev/file-op-9p.h | 3 + fsdev/qemu-fsdev-opts.c | 76 fsdev/qemu-fsdev-throttle.c | 166 fsdev/qemu-fsdev-throttle.h | 37 ++ hw/9