public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Eric Sandeen <sandeen@redhat.com>, xfs-oss <xfs@oss.sgi.com>
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 2/2] xfs: mark the xfs-alloc workqueue as high priority
Date: Fri, 09 Jan 2015 12:12:04 -0600	[thread overview]
Message-ID: <54B019F4.8030009@sandeen.net> (raw)
In-Reply-To: <54B01927.2010506@redhat.com>

I had a case reported where a system under high stress
got deadlocked.  A btree split was handed off to the xfs
allocation workqueue, and it is holding the xfs_ilock
exclusively.  However, other xfs_end_io workers are
not running, because they are waiting for that lock.
As a result, the xfs allocation workqueue never gets
run, and everything grinds to a halt.

To be honest, it's not clear to me how the workqueue
subsystem manages this sort of thing.  But in testing,
making the allocation workqueue high priority so that
it gets added to the front of the pending work list,
resolves the problem.  We did similar things for
the xfs-log workqueues, for similar reasons.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

(slight whitespace shift is to fit in 80 cols, sorry!)

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index e5bdca9..9c549e1 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -874,7 +874,7 @@ xfs_init_mount_workqueues(
 		goto out_destroy_log;
 
 	mp->m_alloc_workqueue = alloc_workqueue("xfs-alloc/%s",
-			WQ_MEM_RECLAIM|WQ_FREEZABLE, 0, mp->m_fsname);
+		       WQ_MEM_RECLAIM|WQ_FREEZABLE|WQ_HIGHPRI, 0, mp->m_fsname);
 	if (!mp->m_alloc_workqueue)
 		goto out_destroy_eofblocks;
 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2015-01-09 18:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 18:08 [PATCH 0/2] xfs: make xfs allocation workqueue per-mount, and high priority Eric Sandeen
2015-01-09 18:10 ` [PATCH 1/2] xfs: make global xfsalloc workqueue per-mount Eric Sandeen
2015-01-12 15:35   ` Brian Foster
2015-01-09 18:12 ` Eric Sandeen [this message]
2015-01-09 18:23   ` [PATCH 2/2] xfs: mark the xfs-alloc workqueue as high priority Tejun Heo
2015-01-09 20:36     ` Eric Sandeen
2015-01-10 19:28       ` Tejun Heo
2015-01-11  0:04         ` Eric Sandeen
2015-01-11  6:33           ` Tejun Heo
2015-01-12 20:09         ` Eric Sandeen
2015-01-12 22:53           ` Tejun Heo
2015-01-12 23:12             ` Eric Sandeen
2015-01-12 23:37               ` Tejun Heo
2015-01-13 19:08                 ` Eric Sandeen
2015-01-13 20:19                   ` Tejun Heo
2015-01-13 20:29                     ` Eric Sandeen
2015-01-13 20:46                       ` Tejun Heo
2015-01-13 22:58                         ` Eric Sandeen
2015-01-13 23:35                           ` [PATCH wq/for-3.19] workqueue: fix subtle pool management issue which can stall whole worker_pool Tejun Heo
2015-01-16 19:32                             ` [PATCH workqueue wq/for-3.19-fixes] " Tejun Heo
2015-01-19  2:15                               ` Lai Jiangshan
2015-01-09 23:28     ` [PATCH 2/2] xfs: mark the xfs-alloc workqueue as high priority Dave Chinner
2015-01-10 17:41       ` Tejun Heo
2015-01-12  3:30         ` Dave Chinner
2015-01-13 20:50           ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B019F4.8030009@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=sandeen@redhat.com \
    --cc=tj@kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox