Message ID | 20241230135114.41947-1-cgoettsche@seltendoof.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | libselinux: update max node depth | expand |
diff --git a/libselinux/src/label_file.h b/libselinux/src/label_file.h index 597b756e..41b2a939 100644 --- a/libselinux/src/label_file.h +++ b/libselinux/src/label_file.h @@ -105,10 +105,10 @@ struct literal_spec { * Max depth of specification nodes * * Measure before changing: - * - 2 leads to slower lookup - * - >4 require more memory (and allocations) for no performance gain + * < leads to slower lookup + * > require more memory (and allocations) for no performance gain */ -#define SPEC_NODE_MAX_DEPTH 3 +#define SPEC_NODE_MAX_DEPTH 4 /* A specification node */ struct spec_node {
From: Christian Göttsche <cgzones@googlemail.com> Bump the maximum specification node depth from 3 to 4 based on updated benchmark on Fedora 41: Benchmark 1: /tmp/destdir3/sbin/restorecon -vRn / Time (mean ± σ): 1.397 s ± 0.018 s [User: 0.755 s, System: 0.641 s] Range (min … max): 1.353 s … 1.419 s 20 runs Benchmark 1: /tmp/destdir4/sbin/restorecon -vRn / Time (mean ± σ): 1.376 s ± 0.021 s [User: 0.737 s, System: 0.637 s] Range (min … max): 1.348 s … 1.414 s 20 runs Benchmark 1: /tmp/destdir5/sbin/restorecon -vRn / Time (mean ± σ): 1.389 s ± 0.021 s [User: 0.748 s, System: 0.640 s] Range (min … max): 1.351 s … 1.420 s 20 runs --- libselinux/src/label_file.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)