asterinas / asterinas

Asterinas is a secure, fast, and general-purpose OS kernel, written in Rust and providing Linux-compatible ABI.
https://asterinas.github.io/
Other
837 stars 86 forks source link

Current status of RCU? #1313

Closed tangruize closed 2 weeks ago

tangruize commented 2 weeks ago

Hi, I'm reviewing the RCU code, but it seems to be disabled and unused. I saw that PR #752 aims to enable it. Could you provide an update on the current status of RCU? Thanks!

tatetian commented 2 weeks ago

@LeslieKid took the task of adding RCU for Asterinas, but didn't have the time to complete it. I don't think @LeslieKid will continue his work on #752.

Although #752 already provides a working implementation, I think it still needs some work before getting merged. First, the RCU API needs to be re-designed. Our RCU API is not as powerful as that of Rust for Linux.

Second, the PR does not include a single RCU user. I talked with @lucassong-mh the other day. His input is that file descriptor table is a good candidate user of RCU. We found out recently that in LMbench's read and write benchmark, acquiring Mutex to access a file table is one of the performance bottlenecks.

tangruize commented 2 weeks ago

@tatetian I see. Thank you for your quick and detailed explanation!