Skip to content
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

Mpfs IHC bugfixes and perf enhancements #10484

Merged
merged 6 commits into from Sep 6, 2023

Conversation

eenurkka
Copy link
Contributor

@eenurkka eenurkka commented Sep 5, 2023

Summary

MPFS IHC has a few bugs. If encountered, the RPMSG bus gets stuck. While fixing the issues, better performance is also achieved though rewriting parts of the code.

Impact

All MPFS systems using IHC / RPMSG

Testing

Overnight testing with SW that utilizes all the RPMSG bandwidth

@eenurkka eenurkka changed the title Mpfs ihc perf Mpfs IHC bugfixes and perf enhancements Sep 5, 2023
arch/risc-v/src/mpfs/mpfs_ihc.c Outdated Show resolved Hide resolved
arch/risc-v/src/mpfs/mpfs_ihc.c Show resolved Hide resolved
RPMSG is associated with the use of HPWORK / LPWORK queues.
After sending a message to the remote end (Linux), the system
waits for an ack before proceeding. Unfortunately this may
take sometimes more time than one would expect. Ack waiting is
also unnecessary: nothing is done with that information. Even
worse, the net_lock() is also held during the blocked time so
it blocks other network stacks that are unrelated to this.

Also reorganize the mpfs_opensbi_*.S so that the trap
handler is easily relocated in the linker .ld file without
the need to relocate the utils.S. This makes it easier to
separate the files into own segments. The trap file should be
located in the zero device.

Moreover, provide support for simultaneous ACK and message
present handling capabilities in both directions. There are
times when both bits are set but only other is being handled.

In the end, the maximum throughput of the RPMSG bus increases
easily 10-20% or even more.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
@xiaoxiang781216
Copy link
Contributor

let's ignore macOS temp ci failure.

@xiaoxiang781216 xiaoxiang781216 merged commit 0152b03 into apache:master Sep 6, 2023
23 of 26 checks passed
@jerpelea jerpelea added this to To-Add in Release Notes - 12.3.0 Sep 26, 2023
@jerpelea jerpelea moved this from To-Add to done in Release Notes - 12.3.0 Oct 4, 2023
@eenurkka eenurkka deleted the mpfs-ihc-perf branch November 21, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants