-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Refactor extra::sync, and extra::arc #7701
Conversation
cc @bblum |
I'm not sure about the name |
On the other hand |
|
One strategy I was thinking about doing for naming was to have the simple names like Also, I've been still working on this pull request and double checking it. |
You've deleted several testcases: presumably the functionality is still there, and so the tests just need to be adjusted for the new modules? (This isn't my area of expertises, so I could easily be wrong.) (Also, you appear to have included the compiled |
The About the test cases, instead of using an explicit I did xfail https://github.com/mozilla/rust/pull/7701/files#diff-15 , and https://github.com/mozilla/rust/pull/7701/files#diff-16 though which when modified gave me strange internal compiler errors. I plan on submitting a full bug report on the issue but have not isolated a suitable small test case yet. Also, I temporarily disabled the https://github.com/mozilla/rust/pull/7701/files#diff-38 test case that failed on my machine, and forgot to change that back. I'll fix that in a bit. |
Overall the RAII implementation looks good, but there are a lot of interface changes that I disagree with, and one showstopper race condition. |
Okay, so I can't get this pull request to work due to issue #7804 so I'm going to break this pull request up into a few smaller pull requests that don't touch on that issue. Also, if anyone thinks it'd be cleaner to close this specific pull request, and have me open a new one when that weird issue that's blocking me is fixed instead of leaving this one open I would not be opposed. |
So huonw pointed out issue #7899 and that let me figure out a workaround so this pull request is now not blocked on that. I'm not exactly happy with how the current system for condition variables works so I might make a few more changes. As well, I haven't yet benchmarked the performance impact of these changes so I might have to make changes for that as well. Finally, I can still probable polish this pull request up a bit more. |
Okay, so using the following test script I got the benchmarks at the bottom. #! /bin/sh
for COMMAND in \
./x86_64-unknown-linux-gnu/test/bench/msgsend-ring-mutex-arcs.stage1-x86_64-unknown-linux-gnu \
./x86_64-unknown-linux-gnu/test/bench/msgsend-ring-rw-arcs.stage1-x86_64-unknown-linux-gnu \
./x86_64-unknown-linux-gnu/test/bench/graph500-bfs.stage1-x86_64-unknown-linux-gnu
do
echo ${COMMAND}
for II in `seq 0 5`
do
${COMMAND}
done
echo
done The results are pretty good for the performance of RWArcs but are slightly worse for the performance of MutexArcs. The graph500-bfs results are included in performance but shouldn't, and didn't change much. Old results on my computer.
New results
|
Convert functionality into RAII style. Split functionality up into the modules. Cleanup dependencies, and redundancies.
So I'm going to break this up into smaller pull requests. |
This is a really big pull request for me so I probable got stuff wrong (also concurrency is really really really difficult.) Because I'm so uncertain about if this is pull request is correct I really want other people to look over it, and second guess it.
Convert functionality into RAII style.
Split functionality up into the modules.
Cleanup dependencies, and redundancies.