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
This commit is contained in:
parent
6d852b5bdb
commit
4202b366fc
@ -378,7 +378,7 @@ ufsdirhash_lookup(struct inode *ip, char *name, int namelen, doff_t *offp,
|
||||
*/
|
||||
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) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user