aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <[email protected]>2024-01-24 15:13:40 -0300
committerGabriel Krisman Bertazi <[email protected]>2024-02-27 16:55:25 -0500
commit0906fbb2f7ad6ae4b1bee8777bf83171a12c10b0 (patch)
tree3e95fa8918261c1a077a1bbd4dd47156508c7bf2 /tools/perf/scripts/python/export-to-postgresql.py
parent052d534373b7ed33712a63d5e17b2b6cdbce84fd (diff)
libfs: Attempt exact-match comparison first during casefolded lookup
Casefolded comparisons are (obviously) way more costly than a simple memcmp. Try the case-sensitive comparison first, falling-back to the case-insensitive lookup only when needed. This allows any exact-match lookup to complete without having to walk the utf8 trie. Note that, for strict mode, generic_ci_d_compare used to reject an invalid UTF-8 string, which would now be considered valid if it exact-matches the disk-name. But, if that is the case, the filesystem is corrupt. More than that, it really doesn't matter in practice, because the name-under-lookup will have already been rejected by generic_ci_d_hash and we won't even get here. The memcmp is safe under RCU because we are operating on str/len instead of dentry->d_name directly, and the caller guarantees their consistency between each other in __d_lookup_rcu_op_compare. Link: https://lore.kernel.org/r/[email protected] Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Gabriel Krisman Bertazi <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions