summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-11-14 15:08:07 +0000
committeriedowse <iedowse@FreeBSD.org>2001-11-14 15:08:07 +0000
commit61d89377de1247c165da480fc9a39aba40204b56 (patch)
treea334ba43ed4305dc115af3516586810ba727dbd2 /sys/ufs
parent05f295d22b062251717e35d1138c9cd384c865cf (diff)
downloadFreeBSD-src-61d89377de1247c165da480fc9a39aba40204b56.zip
FreeBSD-src-61d89377de1247c165da480fc9a39aba40204b56.tar.gz
Oops, when trying the dirhash sequential-access optimisation,
compare the slot offset against the predicted offset, not a boolean flag. This typo effectively disabled the sequential optimisation, but was otherwise harmless. Not surprisingly, fixing this improves performance in the sequential access case. I am seeing a 7% speedup on one machine here; using dirhash when sequentially looking up directory entries is now about 5% faster instead of 2% slower than the non-dirhash case. Submitted by: KOIE Hidetaka <koie@suri.co.jp> MFC after: 1 week
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_dirhash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c
index afd8222..f147ccb 100644
--- a/sys/ufs/ufs/ufs_dirhash.c
+++ b/sys/ufs/ufs/ufs_dirhash.c
@@ -378,7 +378,7 @@ restart:
*/
for (i = slot; (offset = DH_ENTRY(dh, i)) != DIRHASH_EMPTY;
i = WRAPINCR(i, dh->dh_hlen))
- if (offset == dh->dh_seqopt)
+ if (offset == dh->dh_seqoff)
break;
if (offset == dh->dh_seqoff) {
/*
OpenPOWER on IntegriCloud