Skip to content

Make rpmsg buffer size customizable per rpmsg instance  #322

@hubertmis

Description

@hubertmis

I'm looking for a way to efficiently transfer data between cores in an embedded system. I need to transfer small messages between cores A and B, and in parallel transfer longer messages between cores A and C. OpenAMP meets my needs. I can create one instance between cores A and B, and another one between A and C.

The problem I'm facing is inefficient usage of shared memory between cores A and B. It would be enough for me to allocate 16 64-bytes buffers, but with constant RPMSG_BUFFER_SIZE value I need to allocate 16 512-bytes buffers.

I'm aware that RPMSG_BUFFER_SIZE can be modified compile-time, but it does not solve my problem, because for A-C instance I need RPMSG_BUFFER_SIZE=512 while for A-B instance I would like to use RPMSG_BUFFER_SIZE=64.

I would like to propose similar solution to the one implemented in Linux https://elixir.bootlin.com/linux/v5.16-rc3/source/drivers/rpmsg/virtio_rpmsg_bus.c#L910 https://elixir.bootlin.com/linux/v5.16-rc3/source/drivers/rpmsg/virtio_rpmsg_bus.c#L61 and introduce buf_size field in struct rpmsg_virtio_device so that each instance of rpmsg could use different value of buffer sizes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions