2013-07-10 01:46:07

by Dave Airlie

[permalink] [raw]
Subject: virtio indirect with lots of descriptors

Hi Rusty,

playing with my virtio gpu, I started hitting the qemu
error_report("Too many read descriptors in indirect table");

Now I'm not sure but this doesn't seem to be a virtio limit that the
guest catches from what I can see, since my host dies quite quickly,
when I'm doing transfers in/out of a 5MB object with an sg entry per
page.

Just wondering if you can confirm if this is only a qemu limitation or
if I should just work around it at a bit of a higher level in my
driver/device?

Dave.


2013-07-10 02:13:45

by Rusty Russell

[permalink] [raw]
Subject: Re: virtio indirect with lots of descriptors

Dave Airlie <[email protected]> writes:
> Hi Rusty,
>
> playing with my virtio gpu, I started hitting the qemu
> error_report("Too many read descriptors in indirect table");
>
> Now I'm not sure but this doesn't seem to be a virtio limit that the
> guest catches from what I can see, since my host dies quite quickly,
> when I'm doing transfers in/out of a 5MB object with an sg entry per
> page.
>
> Just wondering if you can confirm if this is only a qemu limitation or
> if I should just work around it at a bit of a higher level in my
> driver/device?

You're not allowed to place more descriptors in a single request than
there are elements in the ring *even* if you use indirects, which are
seen as an optimization (thus you can always fall back to direct
descriptors if OOM).

We could change this rule in the 1.0 spec if required, or even make a
special rule for your device, but for the moment that's how it is.

Hope that helps,
Rusty.