-
Notifications
You must be signed in to change notification settings - Fork 24
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
HPCC4J-644 FileUtilityTest atomic record count false sharing #756
Conversation
Jira Issue: https://hpccsystems.atlassian.net/browse/HPCC4J-644 Jirabot Action Result: |
@ghalliday @mckellyln Atomic counter fix. Note: FileUtility is a debugging utility, doesn't affect end user code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpmcmu this looks like a sensible fix based on the offline explanation you provided on the atomic increment issue.
Background information on the issue regarding the atomics: Atomics are fast as long as the cache line that is storing that atomic is in the CPU core's local cache, but when running with a bunch of threads each CPU core first has to request that cache line be moved to their local core's cache before it can be incremented. The end result is each thread is waiting around for that cache line to be moved their core so they can increment it. The result of this false sharing is a problem a lot like lock contention even though atomics are lockless. |
Thanks for tracking this down @jpmcmu |
- Fixed false sharing on atomic counter in FileUtility Signed-off-by: James McMullan [email protected]
@rpastrana retargeted to 9.6.x |
Jirabot Action Result: |
Signed-off-by: James McMullan [email protected]
Type of change:
Checklist:
Testing: