diff options
| author | Jan Kara <[email protected]> | 2021-09-02 14:53:15 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-09-03 09:58:10 -0700 |
| commit | 20792ebf3eeb828a692b29f3000673cb9ca83c3a (patch) | |
| tree | da1d233b22e10d2824da430b27af639b0c502156 /tools/perf/scripts/python/bin | |
| parent | 42dd235cb15c06c8446f9aed695648a3c2eb8d11 (diff) | |
writeback: use READ_ONCE for unlocked reads of writeback stats
We do some unlocked reads of writeback statistics like
avg_write_bandwidth, dirty_ratelimit, or bw_time_stamp. Generally we are
fine with getting somewhat out-of-date values but actually getting
different values in various parts of the functions because the compiler
decided to reload value from original memory location could confuse
calculations. Use READ_ONCE for these unlocked accesses and WRITE_ONCE
for the updates to be on the safe side.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Jan Kara <[email protected]>
Cc: Michael Stapelberg <[email protected]>
Cc: Wu Fengguang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions