summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2021-05-18 02:01:39 +0200
committerVlastimil Babka <vbabka@suse.cz>2021-09-04 01:12:20 +0200
commit9b4bc85a69f57fea93c1f359b393d2c24857d2f5 (patch)
tree1da6925aef4fcc0066ef3c60f5973201af20e3ad /tools/perf/scripts/python/export-to-postgresql.py
parent1572df7cbcb48936c880f2d2de524f8e47ab65d4 (diff)
mm, slub: simplify kmem_cache_cpu and tid setup
In slab_alloc_node() and do_slab_free() fastpaths we need to guarantee that our kmem_cache_cpu pointer is from the same cpu as the tid value. Currently that's done by reading the tid first using this_cpu_read(), then the kmem_cache_cpu pointer and verifying we read the same tid using the pointer and plain READ_ONCE(). This can be simplified to just fetching kmem_cache_cpu pointer and then reading tid using the pointer. That guarantees they are from the same cpu. We don't need to read the tid using this_cpu_read() because the value will be validated by this_cpu_cmpxchg_double(), making sure we are on the correct cpu and the freelist didn't change by anyone preempting us since reading the tid. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Mel Gorman <mgorman@techsingularity.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions