aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorJohn Hubbard <[email protected]>2024-02-27 19:41:51 -0800
committerAndrew Morton <[email protected]>2024-03-04 17:01:27 -0800
commit6c1b748ebf27befffec83b77ca1960bf70ed6ac9 (patch)
treef7f95f3c4d79bb6e47a2c89d41a59a553ce6d51d /tools/perf/scripts/python/stackcollapse.py
parentc8b36003121834cb77fcaf8a1ce0a454d7a97891 (diff)
mm/memory.c: do_numa_page(): remove a redundant page table read
do_numa_page() is reading from the same page table entry, twice, while holding the page table lock: once while checking that the pte hasn't changed, and again in order to modify the pte. Instead, just read the pte once, and save it in the same old_pte variable that already exists. This has no effect on behavior, other than to provide a tiny potential improvement to performance, by avoiding the redundant memory read (which the compiler cannot elide, due to READ_ONCE()). Also improve the associated comments nearby. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: John Hubbard <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Ryan Roberts <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions