cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 0/8] GFS2 shrinker deadlock
@ 2017-05-31 15:03 Andreas Gruenbacher
  2017-05-31 15:03 ` [Cluster-devel] [PATCH 1/8] gfs2: Get rid of flush_delayed_work in gfs2_evict_inode Andreas Gruenbacher
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Andreas Gruenbacher @ 2017-05-31 15:03 UTC (permalink / raw)
  To: cluster-devel.redhat.com

This patch queue fixes a long-standing GFS2 bug that can cause cluster nodes to
lock up under memory pressure.

Right now, when inodes are evicted, GFS2 calls into DLM.  Inode eviction can be
triggered by memory pressure, and it can happen 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), it 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.

This patch queue is a bit complicated, so careful reviews would be very
welcome ;-)

Thanks,
Andreas

Andreas Gruenbacher (8):
  gfs2: Get rid of flush_delayed_work in gfs2_evict_inode
  gfs2: Protect gl->gl_object by spin lock
  gfs2: Clean up glock work enqueuing
  gfs2: Always check block type in gfs2_evict_inode
  gfs2: gfs2_glock_get: Wait on freeing glocks
  gfs2: Get rid of gfs2_set_nlink
  gfs2: gfs2_evict_inode: Put glocks asynchronously
  gfs2: Warn when not deleting inodes under memory pressure

 fs/gfs2/bmap.c   |   7 +-
 fs/gfs2/dir.c    |   6 +-
 fs/gfs2/glock.c  | 247 ++++++++++++++++++++++++++++++++++++++++---------------
 fs/gfs2/glock.h  |   9 ++
 fs/gfs2/glops.c  |  77 +++++++++--------
 fs/gfs2/incore.h |   2 +
 fs/gfs2/inode.c  |  32 +++----
 fs/gfs2/lops.c   |   9 +-
 fs/gfs2/rgrp.c   |   6 +-
 fs/gfs2/super.c  |  57 ++++++++++---
 fs/gfs2/xattr.c  |   6 +-
 11 files changed, 322 insertions(+), 136 deletions(-)

-- 
2.7.4



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

end of thread, other threads:[~2017-06-02 13:57 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-31 15:03 [Cluster-devel] [PATCH 0/8] GFS2 shrinker deadlock Andreas Gruenbacher
2017-05-31 15:03 ` [Cluster-devel] [PATCH 1/8] gfs2: Get rid of flush_delayed_work in gfs2_evict_inode Andreas Gruenbacher
2017-06-01 15:13   ` Steven Whitehouse
2017-05-31 15:03 ` [Cluster-devel] [PATCH 2/8] gfs2: Protect gl->gl_object by spin lock Andreas Gruenbacher
2017-06-01 15:16   ` Steven Whitehouse
2017-05-31 15:03 ` [Cluster-devel] [PATCH 3/8] gfs2: Clean up glock work enqueuing Andreas Gruenbacher
2017-06-01 15:21   ` Steven Whitehouse
2017-06-01 15:43     ` Andreas Gruenbacher
2017-06-01 15:46       ` Steven Whitehouse
2017-06-02  9:19         ` Andreas Gruenbacher
2017-06-02  9:29           ` Steven Whitehouse
2017-05-31 15:03 ` [Cluster-devel] [PATCH 4/8] gfs2: Always check block type in gfs2_evict_inode Andreas Gruenbacher
2017-05-31 15:03 ` [Cluster-devel] [PATCH 5/8] gfs2: gfs2_glock_get: Wait on freeing glocks Andreas Gruenbacher
2017-05-31 15:03 ` [Cluster-devel] [PATCH 6/8] gfs2: Get rid of gfs2_set_nlink Andreas Gruenbacher
2017-05-31 15:03 ` [Cluster-devel] [PATCH 7/8] gfs2: gfs2_evict_inode: Put glocks asynchronously Andreas Gruenbacher
2017-06-01 10:51   ` Andreas Gruenbacher
2017-06-01 15:37   ` Steven Whitehouse
2017-06-02 13:57     ` Andreas Gruenbacher
2017-05-31 15:03 ` [Cluster-devel] [PATCH 8/8] gfs2: Warn when not deleting inodes under memory pressure Andreas Gruenbacher
2017-06-01 15:39   ` Steven Whitehouse

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).