diff options
author | 2024-01-29 08:11:24 -1000 | |
---|---|---|
committer | 2024-01-29 08:11:24 -1000 | |
commit | a045a272d887575da17ad86d6573e82871b50c27 (patch) | |
tree | 85199989447d3ff7cc72c4c4fdd3d0543148e61c /scripts/generate_rust_analyzer.py | |
parent | workqueue: Break up enum definitions and give names to the types (diff) | |
download | linux-rng-a045a272d887575da17ad86d6573e82871b50c27.tar.xz linux-rng-a045a272d887575da17ad86d6573e82871b50c27.zip |
workqueue: Move pwq->max_active to wq->max_active
max_active is a workqueue-wide setting and the configured value is stored in
wq->saved_max_active; however, the effective value was stored in
pwq->max_active. While this is harmless, it makes max_active update process
more complicated and gets in the way of the planned max_active semantic
updates for unbound workqueues.
This patches moves pwq->max_active to wq->max_active. This simplifies the
code and makes freezing and noop max_active updates cheaper too. No
user-visible behavior change is intended.
As wq->max_active is updated while holding wq mutex but read without any
locking, it now uses WRITE/READ_ONCE(). A new locking locking rule WO is
added for it.
v2: wq->max_active now uses WRITE/READ_ONCE() as suggested by Lai.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions