Benjamin Marzinski c4f68a130f [GFS2] delay glock demote for a minimum hold time
When a lot of IO, with some distributed mmap IO, is run on a GFS2 filesystem in
a cluster, it will deadlock. The reason is that do_no_page() will repeatedly
call gfs2_sharewrite_nopage(), because each node keeps giving up the glock
too early, and is forced to call unmap_mapping_range(). This bumps the
mapping->truncate_count sequence count, forcing do_no_page() to retry. This
patch institutes a minimum glock hold time a tenth a second.  This insures
that even in heavy contention cases, the node has enough time to get some
useful work done before it gives up the glock.

A second issue is that when gfs2_glock_dq() is called from within a page fault
to demote a lock, and the associated page needs to be written out, it will
try to acqire a lock on it, but it has already been locked at a higher level.
This patch puts makes gfs2_glock_dq() use the work queue as well, to avoid this
issue. This is the same patch as Steve Whitehouse originally proposed to fix
this issue, execpt that gfs2_glock_dq() now grabs a reference to the glock
before it queues up the work on it.

Signed-off-by: Benjamin E. Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-10-10 08:55:48 +01:00
..
2006-11-30 10:37:32 -05:00
2007-10-10 08:55:36 +01:00
2006-10-20 09:13:40 -04:00
2007-10-10 08:55:32 +01:00
2007-07-09 08:22:24 +01:00
2007-10-10 08:55:03 +01:00
2007-10-10 08:55:03 +01:00
2007-02-05 13:38:20 -05:00
2007-10-10 08:55:34 +01:00
2007-07-19 10:04:41 -07:00
2007-10-10 08:55:10 +01:00
2007-07-09 08:22:19 +01:00
2006-09-05 10:39:21 -04:00