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.
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_SIZEvalue I need to allocate 16 512-bytes buffers.I'm aware that
RPMSG_BUFFER_SIZEcan be modified compile-time, but it does not solve my problem, because for A-C instance I needRPMSG_BUFFER_SIZE=512while for A-B instance I would like to useRPMSG_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_sizefield instruct rpmsg_virtio_deviceso that each instance of rpmsg could use different value of buffer sizes.