linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sjur Brændeland" <sjurbren@gmail.com>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>,
	netdev@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Erwan Yvin <erwan.yvin@stericsson.com>,
	virtualization <virtualization@lists.linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	Ido Yariv <ido@wizery.com>
Subject: Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings)
Date: Thu, 21 Feb 2013 18:28:53 +0100	[thread overview]
Message-ID: <CAJK669YHwR=nf2zSQR6buaA-x1JSowJfU16hkz1+N_WLL0qA+A@mail.gmail.com> (raw)
In-Reply-To: <CAK=Wgba5XkK3c7qh1tYHMGEe7-Qima96uYO4E+uAPcaB8K6bmQ@mail.gmail.com>

Hi Ohad,

> I was wondering - can you please explain your motivation for using
> vringh in caif ?
>
> We have internally discussed supporting multiple remote processors
> talking to each other using rpmsg, and in that scenario using vringh
> can considerably simplifies the solution (no need to decide in advance
> which side is the "guest" and which is the "host"). Was this the
> general incentive in using vringh in caif too or something else?

The motivation for using vringh was to avoid copying buffers
when sending data from the modem to the host. By using
vringh the modem can transfer datagrams to host only by
transfering buffer pointers via the rings.

We use a carveout to declare a memory area that is passed to the
modem internal memory allocator. This way we get both modem
and host to work on the shared memory region.

For TX traffic we use normal virtio queues for the same reason.
TX buffers can be handled without copying as well.

We are seeing a nice performance gain on the modem side after
implementing this.

Host size zero-copy is more tricky. It's hard to handle ownership of buffers,
if the modem crashes. But we might look into this in the future as well.

Regards,
Sjur

  reply	other threads:[~2013-02-21 17:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 11:49 [PATCHv2 vringh 0/3] Introduce CAIF Virtio driver sjur.brandeland
2013-02-12 11:49 ` [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings) sjur.brandeland
2013-02-20 16:05   ` Ohad Ben-Cohen
2013-02-20 23:01     ` Sjur Brændeland
2013-02-21 13:47       ` Ohad Ben-Cohen
2013-02-21 17:28         ` Sjur Brændeland [this message]
2013-02-21 17:55           ` Ohad Ben-Cohen
2013-02-21 19:36             ` Sjur Brændeland
2013-02-23  9:49               ` Ohad Ben-Cohen
2013-02-21  6:37     ` Rusty Russell
2013-02-21 13:53       ` Ohad Ben-Cohen
2013-02-22  0:42         ` Rusty Russell
2013-02-12 11:49 ` [PATCHv2 vringh 2/3] virtio: Add module driver macro for virtio drivers sjur.brandeland
2013-02-12 11:49 ` [PATCHv2 vringh 3/3] caif_virtio: Introduce caif over virtio sjur.brandeland
2013-02-18 23:37   ` 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='CAJK669YHwR=nf2zSQR6buaA-x1JSowJfU16hkz1+N_WLL0qA+A@mail.gmail.com' \
    --to=sjurbren@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dmitry.tarnyagin@stericsson.com \
    --cc=erwan.yvin@stericsson.com \
    --cc=ido@wizery.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).