Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor and fix RPC library.#814

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@iabdalkader
Copy link
Contributor

@iabdalkaderiabdalkader commentedDec 28, 2023
edited
Loading

Main changes in this PR:

  • Fix the memory corruption caused by the wrong MPU region configuration, which enabled caching of the shared memory region, without any cache maintenance in libmetal.
  • Fix the MPU region's TEX level, which was setting the shared memory region as a device and/or strongly-ordered memory, which caused usage faults on unaligned accesses.
  • Fix a deadlock that occurs if the main thread (sketch) makes a remote call and holds the virtqueue's mutex, and then gets preempted by the event thread, which in turn tries to acquire the same mutex. Note that libmetal's mutex implementation doesn't yield the CPU, it can be changed to do so, but for now the queues are protected with an OS mutex.
  • Fix RPCLIB msgpack unpacker memory overflow if RPMSG endpoint buffer > 512.
  • Optimize RPCLIB msgpack unpacker usage by allocating once and extending on demand.
  • Remove extra request/response threads, locking and callbacks, that were causing all sorts of concurrency issues, and were detrimental to performance.
  • Remove the redundant copy of messages to ring buffer, to boost the performance.
  • Remove many smaller dynamic allocation to improve the performance.
  • Use a single endpoint for message packs requests/responses ("RPC"), and another one dedicated for raw (non-packed) data.
  • General refactoring and cleanups, removal of dead code and variables, debugging code, etc...
  • Add MD5 checksum example and RAW ping-pong example.
  • FixesRPC library deadlock and/or vring memory corruption on Giga R1 (possibly other boards too). #802.

This PR depends on the following:

@iabdalkaderiabdalkaderforce-pushed therefactor_rpc_library branch 4 times, most recently from7c7d1ad tob7bb1abCompareDecember 29, 2023 10:27
@iabdalkaderiabdalkaderforce-pushed therefactor_rpc_library branch 2 times, most recently frombbd094b to6f79f00CompareJanuary 10, 2024 12:12
- Fix the memory corruption caused by the wrong MPU region configuration, whichenabled caching of the shared memory region, without any cache maintenance inlibmetal.- Fix the MPU region's TEX level, which was setting the shared memory region asa device and/or strongly-ordered memory, which caused usage faults on unalignedaccesses.- Fix a deadlock that occurs if the main thread (sketch) makes a remote calland holds the virtqueue's mutex, and then gets preempted by the event thread,which in turn tries to acquire the same mutex. Note that libmetal's muteximplementation doesn't yield the CPU, it can be changed to do so, but for nowthe queues are protected with an OS mutex.- Fix RPCLIB msgpack unpacker memory overflow if RPMSG endpoint buffer > 512.- Optimize RPCLIB msgpack unpacker usage by allocating once and extending ondemand.- Remove extra request/response threads, locking and callbacks, that werecausing all sorts of concurrency issues, and were detrimental to performance.- Remove the redundant copy of messages to ring buffer, to boost the performance.- Remove many smaller dynamic allocation to improve the performance.- Use a single endpoint for message packs requests/responses ("RPC"), andanother one dedicated for raw (non-packed) data.- General refactoring and cleanups, removal of dead code and variables,debugging code, etc...Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
- Fix serial pass-through example.- Add MD5 checksum example.- Add RAW-channel ping-pong example.Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@facchinm
Copy link
Member

Manually merged inmain

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

RPC library deadlock and/or vring memory corruption on Giga R1 (possibly other boards too).

2 participants

@iabdalkader@facchinm

[8]ページ先頭

©2009-2025 Movatter.jp