summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorRobbie Ko <robbieko@synology.com>2024-10-15 15:41:37 +0800
committerDavid Sterba <dsterba@suse.com>2024-11-11 14:34:17 +0100
commit99785998ed1cea142e20f4904ced26537a37bf74 (patch)
tree6a74924622cadb1e916864a2ba97a9882c978884 /tools/perf/scripts/python/export-to-postgresql.py
parenta9c50c975656e551ea4bfe0f292b05d0e2a664c5 (diff)
btrfs: reduce lock contention when eb cache miss for btree search
When crawling btree, if an eb cache miss occurs, we change to use the eb read lock and release all previous locks (including the parent lock) to reduce lock contention. If an eb cache miss occurs in a leaf and needs to execute IO, before this change we released locks only from level 2 and up and we read a leaf's content from disk while holding a lock on its parent (level 1), causing the unnecessary lock contention on the parent, after this change we release locks from level 1 and up, but we lock level 0, and read leaf's content from disk. Because we have prepared the check parameters and the read lock of eb we hold, we can ensure that no race will occur during the check and cause unexpected errors. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Robbie Ko <robbieko@synology.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions