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

feat: optimize lock critical section #778

Closed
wants to merge 21 commits into from
Closed

feat: optimize lock critical section #778

wants to merge 21 commits into from

Conversation

MrCroxx
Copy link
Collaborator

@MrCroxx MrCroxx commented Oct 22, 2024

What's changed and what's your intention?

Please explain IN DETAIL what the changes are in this PR and why they are needed. :D

  • Cloning and dropping cache entry no longer requires locking (ref > 0).
  • Use rwlock for cache eviction algorighm without mutable acquire op.
  • Use slab to replace object pool optimization.
  • Refine abstractions.

Checklist

  • I have written the necessary rustdoc comments
  • I have added the necessary unit tests and integration tests
  • I have passed make all (or make fast instead if the old tests are not modified) in my local environment.

Related issues or PRs (optional)

close #779

@MrCroxx MrCroxx added feature New feature or request refactor perf Performance optimization labels Oct 22, 2024
@MrCroxx MrCroxx added this to the v0.13 milestone Oct 22, 2024
@MrCroxx MrCroxx self-assigned this Oct 22, 2024
@MrCroxx MrCroxx marked this pull request as draft October 22, 2024 06:06
@MrCroxx MrCroxx force-pushed the xx/slab branch 5 times, most recently from 3b57e0c to ef51e11 Compare October 23, 2024 15:46
- Cloning and dropping cache entry no longer requires locking (ref > 0).
- Use rwlock for cache eviction algorighm without mutable acquire op.
- Use slab to replace object pool optimization.
- Refine abstractions.

Signed-off-by: MrCroxx <[email protected]>
@MrCroxx MrCroxx changed the title refactor: loose lock restriction, use slab, refine code feat: optimize lock critical section Oct 24, 2024
@MrCroxx MrCroxx requested review from hzxa21, Li0k and wenym1 October 24, 2024 04:09
Copy link

codecov bot commented Oct 24, 2024

@MrCroxx
Copy link
Collaborator Author

MrCroxx commented Nov 26, 2024

Duplicated with #785

@MrCroxx MrCroxx closed this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request perf Performance optimization refactor
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

RFC: use atomic reference count to track external in-memory cache record usage
1 participant