Message ID | 1406720388-18671-11-git-send-email-ming.lei@canonical.com |
---|---|
State | New |
Headers | show |
On 07/30/2014 05:39 AM, Ming Lei wrote: > This patch increases max event to 256 for the comming s/comming/coming/ > virtio-blk multi virtqueue support. > > Signed-off-by: Ming Lei <ming.lei@canonical.com> > --- > block/linux-aio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/linux-aio.c b/block/linux-aio.c > index 5eb9c92..c06a57d 100644 > --- a/block/linux-aio.c > +++ b/block/linux-aio.c > @@ -23,7 +23,7 @@ > * than this we will get EAGAIN from io_submit which is communicated to > * the guest as an I/O error. > */ > -#define MAX_EVENTS 128 > +#define MAX_EVENTS 256 > > #define MAX_QUEUED_IO 128 > >
Il 30/07/2014 13:39, Ming Lei ha scritto: > This patch increases max event to 256 for the comming > virtio-blk multi virtqueue support. > > Signed-off-by: Ming Lei <ming.lei@canonical.com> > --- > block/linux-aio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) What makes the new magic number less magic than the old one? Paolo
On Wed, Jul 30, 2014 at 10:00 PM, Paolo Bonzini <pbonzini@redhat.com> wrote: > Il 30/07/2014 13:39, Ming Lei ha scritto: >> This patch increases max event to 256 for the comming >> virtio-blk multi virtqueue support. >> >> Signed-off-by: Ming Lei <ming.lei@canonical.com> >> --- >> block/linux-aio.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > What makes the new magic number less magic than the old one? Just for supporting the coming multi virtqueue, otherwise it is easy to trigger EAGAIN. Or do you have better idea to figure out a non-magic number? Thanks
On Thu, Jul 31, 2014 at 01:20:22AM +0800, Ming Lei wrote: > On Wed, Jul 30, 2014 at 10:00 PM, Paolo Bonzini <pbonzini@redhat.com> wrote: > > Il 30/07/2014 13:39, Ming Lei ha scritto: > >> This patch increases max event to 256 for the comming > >> virtio-blk multi virtqueue support. > >> > >> Signed-off-by: Ming Lei <ming.lei@canonical.com> > >> --- > >> block/linux-aio.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > > > What makes the new magic number less magic than the old one? > > Just for supporting the coming multi virtqueue, otherwise it is > easy to trigger EAGAIN. > > Or do you have better idea to figure out a non-magic number? The virtio-blk device knows how many requests can be in-flight at a time. laio_init() could take a size parameter. The messy thing is that the block layer is between the virtio-blk device and Linux AIO, so we'd need to pass that information down. Stefan
diff --git a/block/linux-aio.c b/block/linux-aio.c index 5eb9c92..c06a57d 100644 --- a/block/linux-aio.c +++ b/block/linux-aio.c @@ -23,7 +23,7 @@ * than this we will get EAGAIN from io_submit which is communicated to * the guest as an I/O error. */ -#define MAX_EVENTS 128 +#define MAX_EVENTS 256 #define MAX_QUEUED_IO 128
This patch increases max event to 256 for the comming virtio-blk multi virtqueue support. Signed-off-by: Ming Lei <ming.lei@canonical.com> --- block/linux-aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)