]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Glock dump performance regression fix
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 8 Jan 2018 21:35:43 +0000 (22:35 +0100)
committerBob Peterson <rpeterso@redhat.com>
Thu, 1 Feb 2018 18:27:11 +0000 (11:27 -0700)
commit3bf0ca80ce526ff670edfaf97f31b818afc93bb3
treeedfefcd997343e552b05fed68cd2f439dd55ae54
parent7c9b8707273821cf919c70842e37bfa9c8d1282f
gfs2: Glock dump performance regression fix

Restore an optimization removed in commit 7f19449553 "Fix debugfs glocks
dump": keep the glock hash table iterator active while the glock dump
file is held open.  This avoids having to rescan the hash table from the
start for each read, with quadratically rising runtime.

In addition, use rhastable_walk_peek for resuming a glock dump at the
current position: when a glock doesn't fit in the provided buffer
anymore, the next read must revisit the same glock.

Finally, also restart the dump from the first entry when we notice that
the hash table has been resized in gfs2_glock_seq_start.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/glock.c