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

PR: documentation spin loop hint #64348

Open
wants to merge 4 commits into
base: master
from

Conversation

@arnohaase
Copy link

commented Sep 10, 2019

The documentation for 'spin loop hint' explains that yield is better if the lock holder is running on the same CPU. I suggest that 'CPU or core' would be clearer.

Arno Haase added 2 commits Sep 10, 2019
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Sep 10, 2019

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Arno Haase
@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

commented Sep 10, 2019

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Thanks for the PR! In some cases this seems like it makes the wording a bit confusing (like with "same CPU or core or if the"). Could this perhaps be lightly edited to make sure those still make sense? Is there a reason CPU is wrong? Should CPU just be replaced with core? Could something a bit more agnostic like thread be used?

@arnohaase

This comment has been minimized.

Copy link
Author

commented Sep 13, 2019

Thanks for the feedback. The fact that we are having this discussion seems to indicate that the documentation as a whole would profit from some clarifications - I'll think about it over the weekend and come back with a new suggestion.

@arnohaase

This comment has been minimized.

Copy link
Author

commented Sep 17, 2019

I rewrote the documentation for spin loop hints - hopefully clarifying some misleading parts.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Sep 17, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-09-17T10:10:00.4075947Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-17T10:10:00.4261152Z ##[command]git config gc.auto 0
2019-09-17T10:10:00.4350566Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-17T10:10:00.4413650Z ##[command]git config --get-all http.proxy
2019-09-17T10:10:00.4578172Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/64348/merge:refs/remotes/pull/64348/merge
---
2019-09-17T11:15:53.1217167Z .................................................................................................... 1500/9023
2019-09-17T11:15:59.5915066Z .................................................................................................... 1600/9023
2019-09-17T11:16:13.1033780Z ...............................................................i...............i.................... 1700/9023
2019-09-17T11:16:20.7987439Z .................................................................................................... 1800/9023
2019-09-17T11:16:37.4665817Z .......................................................iiiii........................................ 1900/9023
2019-09-17T11:16:49.6766914Z .................................................................................................... 2100/9023
2019-09-17T11:16:52.4350416Z .................................................................................................... 2200/9023
2019-09-17T11:16:56.1923976Z .................................................................................................... 2300/9023
2019-09-17T11:17:05.2897233Z .................................................................................................... 2400/9023
---
2019-09-17T11:20:17.3371809Z ...........................................i...............i........................................ 4700/9023
2019-09-17T11:20:28.8863799Z .................................................................................................... 4800/9023
2019-09-17T11:20:36.3746401Z .................................................................................................... 4900/9023
2019-09-17T11:20:46.6338871Z .................................................................................................... 5000/9023
2019-09-17T11:20:54.7964921Z ...........................ii.ii.................................................................... 5100/9023
2019-09-17T11:21:05.6813944Z .................................................................................................... 5300/9023
2019-09-17T11:21:16.8146009Z ...........................................................................................i........ 5400/9023
2019-09-17T11:21:25.7634286Z .................................................................................................... 5500/9023
2019-09-17T11:21:31.0432763Z .................................................................................................... 5600/9023
2019-09-17T11:21:31.0432763Z .................................................................................................... 5600/9023
2019-09-17T11:21:42.3512472Z ......................................................................................ii...i..ii.... 5700/9023
2019-09-17T11:22:09.6389624Z .................................................................................................... 5900/9023
2019-09-17T11:22:20.4821097Z .................................................................................................... 6000/9023
2019-09-17T11:22:20.4821097Z .................................................................................................... 6000/9023
2019-09-17T11:22:30.0160972Z ........................................................................................i..ii....... 6100/9023
2019-09-17T11:23:02.0762063Z .................................................................................................... 6300/9023
2019-09-17T11:23:06.1547707Z ...............................................i.................................................... 6400/9023
2019-09-17T11:23:08.5037072Z .................................................................................................... 6500/9023
2019-09-17T11:23:11.2110429Z ...................i................................................................................ 6600/9023
---
2019-09-17T11:28:06.9035340Z  finished in 5.465
2019-09-17T11:28:06.9247948Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-17T11:28:07.1007333Z 
2019-09-17T11:28:07.1008876Z running 150 tests
2019-09-17T11:28:10.6239092Z i....iii......iii..iiii....i.............................i..i..................i....i.........ii.i.i 100/150
2019-09-17T11:28:12.8036930Z ..iiii..............i.........iii.i.......ii......
2019-09-17T11:28:12.8042480Z 
2019-09-17T11:28:12.8047819Z  finished in 5.880
2019-09-17T11:28:12.8239359Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-17T11:28:12.9953663Z 
---
2019-09-17T11:28:15.2054689Z  finished in 2.381
2019-09-17T11:28:15.2260643Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-17T11:28:15.4057059Z 
2019-09-17T11:28:15.4057321Z running 9 tests
2019-09-17T11:28:15.4058181Z iiiiiiiii
2019-09-17T11:28:15.4058635Z 
2019-09-17T11:28:15.4058679Z  finished in 0.179
2019-09-17T11:28:15.4258067Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-17T11:28:15.6010069Z 
---
2019-09-17T11:28:35.1880284Z  finished in 19.760
2019-09-17T11:28:35.2089562Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-17T11:28:35.3882913Z 
2019-09-17T11:28:35.3883185Z running 123 tests
2019-09-17T11:29:01.7560341Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i...ii...i.......ii. 100/123
2019-09-17T11:29:06.9899320Z i.i.i......iii.i.....ii
2019-09-17T11:29:06.9900431Z 
2019-09-17T11:29:06.9906292Z  finished in 31.781
2019-09-17T11:29:06.9919244Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-17T11:29:06.9919800Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-09-17T11:44:00.8176043Z 
2019-09-17T11:44:00.8177265Z    Doc-tests core
2019-09-17T11:44:06.3096076Z 
2019-09-17T11:44:06.3097385Z running 2400 tests
2019-09-17T11:44:18.3806948Z ......iiiii......................................................................................... 100/2400
2019-09-17T11:44:30.0774991Z ...........................................................................ii....................... 200/2400
2019-09-17T11:44:43.3601228Z .................................................................................................i.. 300/2400
2019-09-17T11:44:57.6178181Z .................................................................................................... 400/2400
2019-09-17T11:45:08.7821254Z ............................................i..i.................iiii............................... 500/2400
2019-09-17T11:45:30.7945043Z .................................................................................................... 700/2400
2019-09-17T11:45:42.2128260Z .................................................................................................... 800/2400
2019-09-17T11:45:53.6763980Z .................................................................................................... 900/2400
2019-09-17T11:46:04.9721791Z .................................................................................................... 1000/2400
---
2019-09-17T11:51:06.8835282Z ............................................... 300/763
2019-09-17T11:51:06.8843039Z thread '<unnamed>' panicked at 'explicit panic', src/libstd/io/stdio.rs:854:13
2019-09-17T11:51:06.9331801Z .................................................................................................... 400/763
2019-09-17T11:51:09.0228993Z .................................................................................................... 500/763
2019-09-17T11:51:09.0641923Z ....................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1165:5
2019-09-17T11:51:09.0677672Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:1165:5
2019-09-17T11:51:09.0711071Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError.', src/libcore/result.rs:.1165:.5
2019-09-17T11:51:09.3226794Z ..........................................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1165:5
2019-09-17T11:51:09.3255512Z ...........thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1165:5
2019-09-17T11:51:09.3271684Z .thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1165:5
2019-09-17T11:51:09.3529065Z ............... 600/763
---
2019-09-17T11:51:20.8766433Z 
2019-09-17T11:51:20.8768007Z running 991 tests
2019-09-17T11:51:44.1366177Z i................................................................................................... 100/991
2019-09-17T11:51:56.7596856Z .................................................................................................... 200/991
2019-09-17T11:52:05.7822233Z .................iii......i......i...i......i....................................................... 300/991
2019-09-17T11:52:11.9749708Z .................................................................................................... 400/991
2019-09-17T11:52:21.2608317Z ..................................i..i.................................ii........................... 500/991
2019-09-17T11:52:37.7646801Z .................................................................................................... 700/991
2019-09-17T11:52:37.7646801Z .................................................................................................... 700/991
2019-09-17T11:52:46.0492103Z .................iiii............................................................................... 800/991
2019-09-17T11:53:02.2395301Z .................................................................................................... 900/991
2019-09-17T11:53:10.4566741Z .......................................iiii................................................
2019-09-17T11:53:10.4567989Z 
2019-09-17T11:53:10.4683987Z  finished in 256.055
2019-09-17T11:53:11.2776953Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-17T11:53:11.2826129Z    Compiling term v0.0.0 (/checkout/src/libterm)
---
2019-09-17T12:09:22.5586595Z Rustbook (x86_64-unknown-linux-gnu) - edition-guide
2019-09-17T12:09:22.5637079Z Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
2019-09-17T12:09:22.5637474Z    Compiling linkchecker v0.1.0 (/checkout/src/tools/linkchecker)
2019-09-17T12:09:24.6369811Z     Finished release [optimized] target(s) in 2.40s
2019-09-17T12:09:29.3556166Z core/sync/atomic/fn.spin_loop_hint.html:9: broken link - std/sync/Mutex.html
2019-09-17T12:09:29.5181802Z core/hint/fn.spin_loop.html:4: broken link - core/hint/sync/atomic/fn.spin_loop_hint.html
2019-09-17T12:09:32.3159401Z std/sync/atomic/fn.spin_loop_hint.html:9: broken link - std/sync/Mutex.html
2019-09-17T12:09:32.4729214Z std/hint/fn.spin_loop.html:4: broken link - std/hint/sync/atomic/fn.spin_loop_hint.html
2019-09-17T12:09:33.1526192Z thread 'main' panicked at 'found some broken links', src/tools/linkchecker/main.rs:39:9
2019-09-17T12:09:33.1565144Z 
2019-09-17T12:09:33.1565558Z 
2019-09-17T12:09:33.1566371Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
2019-09-17T12:09:33.1566858Z expected success, got: exit code: 101
---
2019-09-17T12:09:33.1632045Z == clock drift check ==
2019-09-17T12:09:33.1646949Z   local time: Tue Sep 17 12:09:33 UTC 2019
2019-09-17T12:09:33.4425018Z   network time: Tue, 17 Sep 2019 12:09:33 GMT
2019-09-17T12:09:33.4441227Z == end clock drift check ==
2019-09-17T12:09:36.1720868Z ##[error]Bash exited with code '1'.
2019-09-17T12:09:36.1765108Z ##[section]Starting: Checkout
2019-09-17T12:09:36.1767541Z ==============================================================================
2019-09-17T12:09:36.1767611Z Task         : Get sources
2019-09-17T12:09:36.1767663Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Sep 17, 2019

Looks reasonable to me! I think though there's some hyperlink errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.