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

reduce vertex metadata size and remove vertex locks #8

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

meyerzinn
Copy link
Collaborator

@meyerzinn meyerzinn commented Mar 19, 2024

Apparently, galois::SpinLock is a massive class that takes >128 bytes to represent. This replaces the use of SpinLock with a simple atomic byte. In theory, we could combine the buffer field and the lock into one flags field, but we already have spare bits in the begin and end fields so that wouldn't change the size.

Also, in each batch only one thread writes to each vertex, so we do not need a lock on vertices.

@AdityaAtulTewari
Copy link

Are you sure that it doesn't do that to prevent false sharing?

@AdityaAtulTewari
Copy link

The lock needs to be cacheline padded. I don't think yours does that?

@AdityaAtulTewari AdityaAtulTewari self-requested a review March 19, 2024 16:56
@meyerzinn meyerzinn force-pushed the meyer/fix-vertex-size branch from 12f1e97 to 67a249c Compare March 19, 2024 17:01
@meyerzinn meyerzinn changed the base branch from master to meyer/perf March 19, 2024 17:01
@meyerzinn meyerzinn changed the title reduce vertex metadata size reduce vertex metadata size and remove vertex locks Mar 19, 2024
@meyerzinn
Copy link
Collaborator Author

Realized we don't need to lock vertices if each batch has only one thread write to each vertex.

Base automatically changed from meyer/perf to master March 19, 2024 17:06
@meyerzinn meyerzinn force-pushed the meyer/fix-vertex-size branch from 67a249c to 1579a30 Compare March 19, 2024 17:07
@meyerzinn meyerzinn requested a review from anubhavgoel26 March 19, 2024 17:38
@meyerzinn meyerzinn force-pushed the meyer/fix-vertex-size branch from 1579a30 to d6cace4 Compare March 19, 2024 19:35
@meyerzinn meyerzinn merged commit 700cc9b into master Mar 21, 2024
5 checks passed
@meyerzinn meyerzinn deleted the meyer/fix-vertex-size branch March 21, 2024 16:16
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

Successfully merging this pull request may close these issues.

2 participants