All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Dave Airlie <airlied@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	qemu-devel@nongnu.org
Subject: Re: virtio indirect with lots of descriptors
Date: Wed, 10 Jul 2013 11:42:30 +0930	[thread overview]
Message-ID: <87sizncgdt.fsf@rustcorp.com.au> (raw)
In-Reply-To: <CAPM=9tzTUuOjmicjKs+OWirLz6+oHKJgnHjKHAd7WLv8JGmKCA@mail.gmail.com>

Dave Airlie <airlied@gmail.com> 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.

WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: Dave Airlie <airlied@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] virtio indirect with lots of descriptors
Date: Wed, 10 Jul 2013 11:42:30 +0930	[thread overview]
Message-ID: <87sizncgdt.fsf@rustcorp.com.au> (raw)
In-Reply-To: <CAPM=9tzTUuOjmicjKs+OWirLz6+oHKJgnHjKHAd7WLv8JGmKCA@mail.gmail.com>

Dave Airlie <airlied@gmail.com> 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.

  reply	other threads:[~2013-07-10  2:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  1:46 virtio indirect with lots of descriptors Dave Airlie
2013-07-10  1:46 ` [Qemu-devel] " Dave Airlie
2013-07-10  2:12 ` Rusty Russell [this message]
2013-07-10  2:12   ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sizncgdt.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=airlied@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.