]> 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)
commite71fb58694fc45e4ef3ecd4338f93c726b5d5fcc
treeedfefcd997343e552b05fed68cd2f439dd55ae54
parent86aff44f694fade5b407132f6a11bfde21e5f924
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