git: sbin/hammer: Move cache to tailq end when get_buffer_data() has a valid cache
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Fri Jul 7 01:28:47 PDT 2017
commit 63eacb74267a5a2776a215b529ab1a6f6939b80b
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Sun Jul 2 21:30:08 2017 +0300
sbin/hammer: Move cache to tailq end when get_buffer_data() has a valid cache
This is the same as what get_buffer() does when new allocation
is not needed. This hasn't been done in get_buffer_data() when
the given non NULL buffer is the one to look for.
This seems to make newfs_hammer a bit faster, as the i/o size is
normally large enough to invoke eviction of HAMMER userspace buffer
cache while running, starting from the head of the tailq.
-- before this commit
# for x in 1 2 3 4 5; do
> (time newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null) 2>&1 | grep real
> done
real 0m20.291s
real 0m20.574s
real 0m22.347s
real 0m21.562s
real 0m20.991s
-- with this commit
# for x in 1 2 3 4 5; do
> (time newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null) 2>&1 | grep real
> done
real 0m18.023s
real 0m18.064s
real 0m18.104s
real 0m17.646s
real 0m18.310s
Summary of changes:
sbin/hammer/ondisk.c | 2 ++
1 file changed, 2 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/63eacb74267a5a2776a215b529ab1a6f6939b80b
--
DragonFly BSD source repository
More information about the Commits
mailing list