diff options
| author | Ryan Roberts <[email protected]> | 2023-06-02 10:29:47 +0100 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-06-09 16:25:55 -0700 |
| commit | c11d34fa139e4b0fb4249a30f37b178353533fa1 (patch) | |
| tree | 3e2c41caa4d16a715bb784ad29a241f47b85670c /tools/perf/scripts/python/bin/flamegraph-record | |
| parent | b3f78e74986546a6da5d28c24e627d95d17f79ec (diff) | |
mm/damon/ops-common: atomically test and clear young on ptes and pmds
It is racy to non-atomically read a pte, then clear the young bit, then
write it back as this could discard dirty information. Further, it is bad
practice to directly set a pte entry within a table. Instead clearing
young must go through the arch-provided helper,
ptep_test_and_clear_young() to ensure it is modified atomically and to
give the arch code visibility and allow it to check (and potentially
modify) the operation.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 3f49584b262c ("mm/damon: implement primitives for the virtual memory address spaces").
Signed-off-by: Ryan Roberts <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Reviewed-by: SeongJae Park <[email protected]>
Reviewed-by: Mike Rapoport (IBM) <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Uladzislau Rezki (Sony) <[email protected]>
Cc: Yu Zhao <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/flamegraph-record')
0 files changed, 0 insertions, 0 deletions