Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings)
From: Sjur BrÃndeland
Date: Thu Feb 21 2013 - 12:28:57 EST
> 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
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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/