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

Software Write Barrier should clarify need for software solution on non-Windows #58

Open
rdoeffinger opened this issue Oct 6, 2018 · 0 comments

Comments

@rdoeffinger
Copy link

The article simply claims that "hardware write barrier is not available", but does not explain why similar mechanisms are not used, e.g. if they are not usable, not fast enough, not convenient or the author simply was not aware of them.
Linux for example has soft-dirty, see Documentation/vm/soft-dirty.txt
It works pretty similar to the Windows feature I'd claim, HOWEVER resetting its state always operates on all of the process' memory space instead of just specific ranges, it likely is also slower due to being pagefault-based (but then, at least on ARM architecture even the Windows feature surely must be pagefault-based?).
It is possible to map pages read-only and catch SIGSEGV, alternatively there is also MADV_USERFAULT (though I have not investigated how usable it is for catching only writes).
All these in a library admittedly have the issue of potentially interfering with the host application if it also uses the feature, but the wiki at least mentioning those options and thoughts on their usefulness might be useful for anyone who'd like to try their hand at optimization of this feature for non-Windows.

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