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

[idea] RCU #41

Open
dimaqq opened this issue Jun 11, 2017 · 1 comment
Open

[idea] RCU #41

dimaqq opened this issue Jun 11, 2017 · 1 comment

Comments

@dimaqq
Copy link

dimaqq commented Jun 11, 2017

Linux kernel switched from spinlocks to seqlocks to RCU.

Perhaps there's a parallel with Python containers, at least. If two threads want to expand dict storage, perhaps it doesn't matter which thread's allocation is ultimately used. Likewise, if two threads want to list.append (blindly), it doesn't matter what order the entries are appended in.

The upside is no slowdown for reads (so reference counts are out).

@dimaqq
Copy link
Author

dimaqq commented Jun 11, 2017

There's an interesting interplay between RCU and GC -- in the kernel and refcount world, thread has to deallocate "old" data; but if datum is subject to GC, it can just leave garbage be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant