cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH v2 0/4] GFS2 shrinker deadlock
@ 2017-07-03 14:56 Andreas Gruenbacher
  2017-07-03 14:56 ` [Cluster-devel] [PATCH v2 1/4] gfs2: gfs2_glock_get: Wait on freeing glocks Andreas Gruenbacher
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Andreas Gruenbacher @ 2017-07-03 14:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

These are the remaining patches for fixing a cluster-wide GFS2 and DLM
deadlock.

As explained in the previous posting of this patch queue, when inodes
are evicted, GFS2 currently calls into DLM.  Inode eviction can be
triggered by memory pressure, in the context of a random user-space
process.  If DLM happens to block in the process in question (for
example, it that process is a fence agent), GFS2 and DLM will deadlock.

This patch queue stops GFS2 from calling into DLM on the inode evict
path when under memory pressure.  It does so by first decoupling
destroying inodes and putting their associated glocks, which is what
ends up calling into DLM.  Second, when under memory pressure, it moves
putting glocks into work queue context where it cannot block DLM.
Third, when gfs2_drop_inode determines that an inode's link count has
hit zero under memory pressure, it puts that inode on the delete
workqueue (and keeps the inode in the icache) instead of causing
gfs2_evict_inode to delete the inode immediately.  The delete workqueue
will not be processed under memory pressure, so deleting inodes from
there is safe.

Thanks,
Andreas

Andreas Gruenbacher (4):
  gfs2: gfs2_glock_get: Wait on freeing glocks
  gfs2: Get rid of gfs2_set_nlink
  gfs2: gfs2_evict_inode: Put glocks asynchronously
  gfs2: Defer deleting inodes under memory pressure

 fs/gfs2/glock.c  | 145 ++++++++++++++++++++++++++++++++++++++++++++++---------
 fs/gfs2/glock.h  |   2 +
 fs/gfs2/glops.c  |  28 +----------
 fs/gfs2/incore.h |   1 +
 fs/gfs2/super.c  |  39 ++++++++++++++-
 5 files changed, 162 insertions(+), 53 deletions(-)

-- 
2.7.5



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-05 14:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 14:56 [Cluster-devel] [PATCH v2 0/4] GFS2 shrinker deadlock Andreas Gruenbacher
2017-07-03 14:56 ` [Cluster-devel] [PATCH v2 1/4] gfs2: gfs2_glock_get: Wait on freeing glocks Andreas Gruenbacher
2017-07-04 12:13   ` Steven Whitehouse
2017-07-05 14:22   ` Andreas Gruenbacher
2017-07-05 14:28     ` Steven Whitehouse
2017-07-03 14:56 ` [Cluster-devel] [PATCH v2 2/4] gfs2: Get rid of gfs2_set_nlink Andreas Gruenbacher
2017-07-03 14:56 ` [Cluster-devel] [PATCH v2 3/4] gfs2: gfs2_evict_inode: Put glocks asynchronously Andreas Gruenbacher
2017-07-04 12:16   ` Steven Whitehouse
2017-07-03 14:56 ` [Cluster-devel] [PATCH v2 4/4] gfs2: Defer deleting inodes under memory pressure Andreas Gruenbacher
2017-07-04 12:17   ` Steven Whitehouse
2017-07-04 12:11 ` [Cluster-devel] [PATCH v2 0/4] GFS2 shrinker deadlock Steven Whitehouse
2017-07-05  9:57   ` Andreas Gruenbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).