diff options
author | iedowse <iedowse@FreeBSD.org> | 2001-11-14 15:08:07 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2001-11-14 15:08:07 +0000 |
commit | 61d89377de1247c165da480fc9a39aba40204b56 (patch) | |
tree | a334ba43ed4305dc115af3516586810ba727dbd2 /sys/ufs | |
parent | 05f295d22b062251717e35d1138c9cd384c865cf (diff) | |
download | FreeBSD-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.c | 2 |
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) { /* |