summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-08-31 18:56:05 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-09-21 14:15:22 -0700
commit3b8bbd990ce57815f0b0b4b60029ba8d173f5912 (patch)
treef1674b0a97c8545790447efe8cf0d521202f3287 /tools/perf/scripts/python/Perf-Trace-Util
parentbc0c8fe8b11e30ac7d881638ed422a7473827bb7 (diff)
f2fs: avoid race in between atomic_read & atomic_inc
Previously, we will miss merging flush command during fsync due to below race condition: Thread A Thread B Thread C - f2fs_issue_flush - atomic_read(&issing_flush) - f2fs_issue_flush - atomic_read(&issing_flush) - f2fs_issue_flush - atomic_read(&issing_flush) - atomic_inc(&issing_flush) - atomic_inc(&issing_flush) - atomic_inc(&issing_flush) - submit_flush_wait - submit_flush_wait - submit_flush_wait It needs to use atomic_inc_return instead to avoid such race. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util')
0 files changed, 0 insertions, 0 deletions