-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make rpmsg buffer size customizable per rpmsg instance #322
Comments
You can try this patch: |
The #155 offers a very interesting feature, which allows to customize the size of RX and TX. But we can move on to the communication part of the buffer size based on @xiaoxiang781216 work. what about adding a new API that could be called befor the
This would allow to customize the size without impacting legay implementations. and kept the rpmsg decorellated from the resource table handled by the remoteproc. I suppose the negociation part could be reuse the API. |
Yes, I think it could be the first step to the final dynamical negotiation, so both side can config the buffer size with the same value manually. |
I like proposed idea. How shall we proceed with this? @xiaoxiang781216, are you planning to update your PR accordingly? |
I don't have free time in this week. But since the first proposal is very simple, you may create a PR, @arnopo and I can help review the change. |
I've started implementation, but it looks the proposal breaks current assumptions about code flow. If Because of this How about solving this by creating a new function @arnopo, what do you think? |
Yes it looks cleaner |
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 needRPMSG_BUFFER_SIZE=512
while 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_size
field instruct rpmsg_virtio_device
so that each instance of rpmsg could use different value of buffer sizes.The text was updated successfully, but these errors were encountered: