[lkml]   [2019]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/3] Enhance virtio rpmsg bus driver buffer allocation
On Thu 31 Jan 07:41 PST 2019, Xiang Xiao wrote:

> Hi,
> This series enhance the buffer allocation by:
> 1.Support the different buffer number in rx/tx direction
> 2.Get the individual rx/tx buffer size from config space
> Here is the related OpenAMP change:

This looks pretty reasonable, but can you confirm that it's possible to
use new firmware with an old Linux kernel when introducing this?

But ever since we discussed Loic's similar proposal earlier I've been
questioning if the fixed buffer size isn't just an artifact of how we
preallocate our buffers. The virtqueue seems to support arbitrary sizes
of buffers and I see that the receive function in OpenAMP has been fixed
to put back the buffer of the size that was received, rather than 512
bytes. So it seems like Linux would be able to send whatever size
messages to OpenAMP it would handle it.

The question is if we could do the same in the other direction, perhaps
by letting the OpenAMP side do it's message allocation when it's
sending, rather than Linux pushing inbufs to be filled by the remote.

This would remove the problem of always having suboptimal buffer sizes.


> Xiang Xiao (3):
> rpmsg: virtio_rpmsg_bus: allow the different vring size for send/recv
> rpmsg: virtio_rpmsg_bus: allocate rx/tx buffer separately
> rpmsg: virtio_rpmsg_bus: get buffer size from config space
> drivers/rpmsg/virtio_rpmsg_bus.c | 127 +++++++++++++++++++++++---------------
> include/uapi/linux/virtio_rpmsg.h | 24 +++++++
> 2 files changed, 100 insertions(+), 51 deletions(-)
> create mode 100644 include/uapi/linux/virtio_rpmsg.h
> --
> 2.7.4

 \ /
  Last update: 2019-06-05 06:34    [W:0.132 / U:7.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site