rust/library/std/src
bors 1d6f24210c Auto merge of #88652 - AGSaidi:linux-aarch64-should-be-actually-monotonic, r=yaahc
linux/aarch64 Now() should be actually_monotonic()

While issues have been seen on arm64 platforms the Arm architecture requires
that the counter monotonically increases and that it must provide a uniform
view of system time (e.g. it must not be possible for a core to receive a
message from another core with a time stamp and observe time going backwards
(ARM DDI 0487G.b D11.1.2). While there have been a few 64bit SoCs that have
bugs (#49281, #56940) which cause time to not monotonically increase, these have
been fixed in the Linux kernel and we shouldn't penalize all Arm SoCs for those
who refuse to update their kernels:
SUN50I_ERRATUM_UNKNOWN1 - Allwinner A64 / Pine A64 - fixed in 5.1
FSL_ERRATUM_A008585 - Freescale LS2080A/LS1043A - fixed in 4.10
HISILICON_ERRATUM_161010101 - Hisilicon 1610 - fixed in 4.11
ARM64_ERRATUM_858921 - Cortex A73 - fixed in 4.12

255a3f3e18 std: Force `Instant::now()` to be monotonic added a Mutex to work around
this problem and a small test program using glommio shows the majority of time spent
acquiring and releasing this Mutex. 3914a7b0da tries to improve this, but actually
makes it worse on big systems as for 128b atomics a ldxp/stxp pair (and successful loop)
for v8.4 systems that don't support FEAT_LSE2 is required which is expensive as a lock
and because of how the load/store-exclusives scale on large Arm systems is both unfair
to threads and tends to go backwards in performance.

A small sample program using glommio improves by 70x on a 32 core Graviton2
system with this change.
2021-10-17 09:30:30 +00:00
..
backtrace Add Frames iterator for Backtrace 2021-01-23 11:56:33 -06:00
collections Rollup merge of #89729 - jkugelman:must-use-core-std-constructors, r=joshtriplett 2021-10-11 14:11:43 +02:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32 More lerp tests, altering lerp docs 2021-06-13 14:00:15 -04:00
f64 More lerp tests, altering lerp docs 2021-06-13 14:00:15 -04:00
ffi Rollup merge of #89794 - jkugelman:must-use-to_value-conversions, r=joshtriplett 2021-10-13 21:55:13 +09:00
fs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
io Rollup merge of #89753 - jkugelman:must-use-from_value-conversions, r=joshtriplett 2021-10-11 14:11:45 +02:00
lazy Upgrade wasm32 image to Ubuntu 20.04 2021-02-06 13:05:56 +01:00
net Rollup merge of #89794 - jkugelman:must-use-to_value-conversions, r=joshtriplett 2021-10-13 21:55:13 +09:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Auto merge of #85379 - mdaverde:uds-abstract, r=joshtriplett 2021-10-15 22:31:53 +00:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path path.push() should work as expected on windows verbatim paths 2021-10-01 19:54:57 +01:00
prelude Move asm! and global_asm! to core::arch 2021-07-18 18:30:58 -04:00
process Test that env_clear works on Windows 2021-06-24 09:32:24 +01:00
sync Add #[must_use] to is_condition tests 2021-10-11 21:15:57 -04:00
sys Auto merge of #88652 - AGSaidi:linux-aarch64-should-be-actually-monotonic, r=yaahc 2021-10-17 09:30:30 +00:00
sys_common Rollup merge of #89707 - clemenswasser:apply_clippy_suggestions, r=Mark-Simulacrum 2021-10-11 00:34:39 +02:00
thread Rollup merge of #89670 - yoshuawuyts:available-parallelism-docs, r=joshtriplett 2021-10-13 22:51:01 +02:00
time Rollup merge of #88651 - AGSaidi:monotonize-inner-64b-aarch64, r=dtolnay 2021-10-04 23:56:17 -07:00
alloc.rs Rename rterr to rtprintpanic 2021-05-19 15:52:09 +02:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
env.rs library/std/env: Add 'm68k' to comment on ARCH constant 2021-09-17 15:07:14 +00:00
error.rs Stabilize try_reserve 2021-10-04 10:29:46 +01:00
f32.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
f64.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
fs.rs Add #[must_use] to is_condition tests 2021-10-11 21:15:57 -04:00
keyword_docs.rs Fix typo in break docs 2021-09-16 14:51:14 +03:00
lazy.rs Add #[must_use] to core and std constructors 2021-10-10 02:44:26 -04:00
lib.rs Fix missing remaining compiler specific cfg information 2021-10-14 11:39:30 +02:00
macros.rs bump bootstrap compiler to 1.55 2021-08-01 11:19:24 -04:00
num.rs Add Saturating type (based on Wrapping type) 2021-08-10 19:27:01 +02:00
panic.rs Allow panic!("{}", computed_str) in const fn. 2021-09-15 21:56:43 +01:00
panicking.rs Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
path.rs Rollup merge of #89794 - jkugelman:must-use-to_value-conversions, r=joshtriplett 2021-10-13 21:55:13 +09:00
primitive_docs.rs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
process.rs Rollup merge of #88436 - lf-:stabilize-command-access, r=yaahc 2021-10-09 17:08:39 +02:00
rt.rs Auto merge of #89011 - bjorn3:restructure_rt, r=dtolnay 2021-09-29 17:58:08 +00:00
time.rs Auto merge of #88652 - AGSaidi:linux-aarch64-should-be-actually-monotonic, r=yaahc 2021-10-17 09:30:30 +00:00