summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorBohdan Trach <bohdan.trach@huaweicloud.com>2026-06-15 12:03:28 +0200
committerTheodore Ts'o <tytso@mit.edu>2026-07-21 11:26:39 -0400
commit0e364a030229b3b06b858dbe4b7412d87d9d86ce (patch)
tree011d296178659a377fcab262f302f9d0cae30c01 /tools/perf/scripts/python/export-to-postgresql.py
parenta897682793eba5de51ee6f3152760374afa629cf (diff)
ext4: avoid RWM atomic in EXT4_MB_GRP_TEST_AND_SET_READ
EXT4_MB_GRP_TEST_AND_SET_READ uses test_and_set_bit function which issues an atomic write. This can cause high overhead due to cache contention when multiple threads iterate over groups in a tight loop, as is the case for ext4_mb_prefetch(). We have seen this to be a problem for Kunpeng 920b CPUs which uses a single ARM LSE instruction for this purpose. Avoid this unconditional atomic write by testing the bit first without changing its value. This is OK for this use case as this bit is never unset. This change significantly reduces costs of fallocate() operations which trigger linear group scans on large multicore machines where test_and_set_bit issues an atomic write operation unconditionally. Signed-off-by: Bohdan Trach <bohdan.trach@huaweicloud.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260615100331.163997-2-bohdan.trach@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions