diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2012-06-08 11:16:22 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-06-08 11:16:22 +0100 |
commit | ba1ddcb6ca0c46edd275790d1e4e2cfd6219ce19 (patch) | |
tree | 76d134ba74c609f5afa66e0e5c4b8bc541fc84b3 /net/socket.c | |
parent | df5d2f5560a9c33129391a136ed9f0ac26abe69b (diff) |
GFS2: Cache last hash bucket for glock seq_files
For the glocks and glstats seq_files, which are exposed via debugfs
we should cache the most recent hash bucket, along with the offset
into that bucket. This allows us to restart from that point, rather
than having to begin at the beginning each time.
This is an idea from Eric Dumazet, however I've slightly extended it
so that if the position from which we are due to start is at any
point beyond the last cached point, we start from the last cached
point, plus whatever is the appropriate offset. I don't really expect
people to be lseeking around these files, but if they did so with only
positive offsets, then we'd still get some of the benefit of using a
cached offset.
With my simple test of around 200k entries in the file, I'm seeing
an approx 10x speed up.
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'net/socket.c')
0 files changed, 0 insertions, 0 deletions