-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
101 lines (84 loc) · 3.52 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[package]
name = "viscose"
description = "Prototyping locality-aware fork-join task scheduling"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
# Warn when the safe join() concurrency limit imposed by Linux is exceeded
#
# To ease support for old and low-end hardware without 64-bit atomics support,
# the Linux kernel limits the size of the "futex" integer atomics used to block
# and unblock tasks to 32 bits. This means the information used by a waiting
# worker thread to determine if the state of the world is unchanged and it
# should fall asleep must fit in that many bits.
#
# This futex size limit, in turn, indirectly limits the number of join()s whose
# remote task can concurrently execute before there is a risk of lost worker
# wakeup caused by the ABA problem. For most programs, this chance of this
# happening is very small even in the unsafe concurrency range, but when it
# happens it can lead to worker thread deadlock which is a serious problem.
#
# The join concurrency limit depends on details of the thread pool
# implementation, but is guaranteed to be at least 2^16-1 (65535) concurrent
# joins, which is far above the amount of concurrency needed for efficient
# execution on common hardware. Therefore, when you reach this limit, the best
# course of action is normally to simply use less join()s by tuning up the
# sequential processing threshold of your program.
#
# To do so, however, you need to know when you're hitting the limit, and that's
# what this feature is about. At the cost of slightly increasing the complexity
# of the join() hot code path and adding a dependency on the log library, it
# lets the thread pool implementation emit an error log when the limit is
# reached, which lets you know about it and take corrective action.
detect-excessive-joins = ["log"]
# Enable general-purpose logging
log = ["dep:log"]
# Enable benchmarking code (must be enabled for benchmarks to compile)
bench = ["dep:criterion", "dep:env_logger", "dep:iterator_ilp", "dep:pessimize", "dep:rayon"]
# Enable benchmarking of flags
#
# Since flags are a lower-level building block, the need to benchmark them comes
# up less often, and the massive amout of flags benchmarks slows down Criterion
# runs significantly even when the benchmarks are not run.
bench-flags = ["bench"]
# Enable unsafe join concurrency detection and benchmarking by default
default = ["detect-excessive-joins", "bench"]
[dependencies]
# Core dependencies
atomic-wait = { version = "1.1.0", default-features = false }
crossbeam = { version = "0.8.2" }
hwlocality = { git = "https://github.com/HadrienG2/hwlocality.git", features = ["hwloc-2_2_0"] }
rand = "0.8"
# Used to optionally warn about dangerous or inefficient library usage
log = { version = "0.4", optional = true }
# Benchmark dependencies
criterion = { version = "0.5.1", default-features = false, optional = true }
env_logger = { version = "0.10", optional = true }
iterator_ilp = { version = "2.0", optional = true }
pessimize = { git = "https://github.com/HadrienG2/pessimize.git", optional = true }
rayon = { version = "1.8.0", default-features = false, optional = true }
[dev-dependencies]
env_logger = "0.10"
proptest = "1.3"
[lib]
bench = false
[[bench]]
name = "flags"
harness = false
[[bench]]
name = "fibonacci"
harness = false
[[bench]]
name = "square"
harness = false
[[bench]]
name = "sum"
harness = false
[[bench]]
name = "norm_sqr"
harness = false
[profile.bench]
debug = "line-tables-only"
codegen-units = 1
lto = "thin"