diff options
author | Dave Martin <[email protected]> | 2020-06-10 18:03:10 +0100 |
---|---|---|
committer | Will Deacon <[email protected]> | 2020-06-15 16:57:42 +0100 |
commit | 1e570f512cbdc5e9e401ba640d9827985c1bea1e (patch) | |
tree | e099a494e37b2b046c57be93dd524590df456ff2 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 9ba6a9efa4a4c721d0115089bf422f82b8a59e45 (diff) |
arm64/sve: Eliminate data races on sve_default_vl
sve_default_vl can be modified via the /proc/sys/abi/sve_default_vl
sysctl concurrently with use, and modified concurrently by multiple
threads.
Adding a lock for this seems overkill, and I don't want to think any
more than necessary, so just define wrappers using READ_ONCE()/
WRITE_ONCE().
This will avoid the possibility of torn accesses and repeated loads
and stores.
There's no evidence yet that this is going wrong in practice: this
is just hygiene. For generic sysctl users, it would be better to
build this kind of thing into the sysctl common code somehow.
Reported-by: Will Deacon <[email protected]>
Signed-off-by: Dave Martin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[will: move set_sve_default_vl() inside #ifdef to squash allnoconfig warning]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions