All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Priebe - Profihost AG <s.priebe@profihost.ag>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Christoph Hellwig <hch@infradead.org>, Tejun Heo <tj@kernel.org>,
	xfs@oss.sgi.com
Subject: Re: [PATCH 3/4] xfs: revert to using a kthread for AIL pushing
Date: Mon, 10 Oct 2011 08:06:25 +0200	[thread overview]
Message-ID: <4E928B61.8080107@profihost.ag> (raw)
In-Reply-To: <20111010055546.GA1641@x4.trippels.de>

Am 10.10.2011 07:55, schrieb Markus Trippelsdorf:
> Wouldn't it be possible to verify that the problem also goes away with
> this simple one liner?
>
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 2366c54..daf30c9 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1654,7 +1654,7 @@ xfs_init_workqueues(void)
>   	if (!xfs_syncd_wq)
>   		goto out;
>
> -	xfs_ail_wq = alloc_workqueue("xfsail", WQ_CPU_INTENSIVE, 8);
> +	xfs_ail_wq = alloc_workqueue("xfsail", WQ_HIGHPRI | WQ_CPU_INTENSIVE, 8);
>   	if (!xfs_ail_wq)
>   		goto out_destroy_syncd;
>
>  From Documentation/workqueue.txt:
>
>    WQ_HIGHPRI | WQ_CPU_INTENSIVE
>
> 	This combination makes the wq avoid interaction with
> 	concurrency management completely and behave as a simple
> 	per-CPU execution context provider.  Work items queued on a
> 	highpri CPU-intensive wq start execution as soon as resources
> 	are available and don't affect execution of other work items.
>
> So this should be identical to reverting back to the kthread. No?
> CCing Tejun, maybe he can comment on this?

We already tested this patch and it still fails / deadlocks:

diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index a1a881e..6377f51 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -1669,7 +1669,7 @@ xfs_init_workqueues(void)
  	if (!xfs_syncd_wq)
  		goto out;

-	xfs_ail_wq = alloc_workqueue("xfsail", WQ_CPU_INTENSIVE, 8);
+	xfs_ail_wq = alloc_workqueue("xfsail", WQ_MEM_RECLAIM | WQ_HIGHPRI, 512);
  	if (!xfs_ail_wq)
  		goto out_destroy_syncd;

diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index 953b142..638ea8b 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -600,7 +600,7 @@ out_done:
  	}

  	/* There is more to do, requeue us.  */
-	queue_delayed_work(xfs_syncd_wq, &ailp->xa_work,
+	queue_delayed_work(xfs_ail_wq, &ailp->xa_work,
  					msecs_to_jiffies(tout));
  }

@@ -637,7 +637,7 @@ xfs_ail_push(
  	smp_wmb();
  	xfs_trans_ail_copy_lsn(ailp, &ailp->xa_target, &threshold_lsn);
  	if (!test_and_set_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags))
-		queue_delayed_work(xfs_syncd_wq, &ailp->xa_work, 0);
+		queue_delayed_work(xfs_ail_wq, &ailp->xa_work, 0);
  }

  /*


Stefan

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

  reply	other threads:[~2011-10-10  6:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06 18:32 [PATCH 0/4] fix AIL pushing under heavy concurrent metadata loads Christoph Hellwig
2011-10-06 18:32 ` [PATCH 1/4] xfs: do not update xa_last_pushed_lsn for locked items Christoph Hellwig
2011-10-07 22:18   ` Alex Elder
2011-10-10  1:37   ` Dave Chinner
2011-10-06 18:32 ` [PATCH 2/4] xfs: force the log if we encounter pinned buffers in .iop_pushbuf Christoph Hellwig
2011-10-07 22:18   ` Alex Elder
2011-10-10  1:39   ` Dave Chinner
2011-10-06 18:33 ` [PATCH 3/4] xfs: revert to using a kthread for AIL pushing Christoph Hellwig
2011-10-07 22:18   ` Alex Elder
2011-10-10  1:45   ` Dave Chinner
2011-10-10  5:55     ` Markus Trippelsdorf
2011-10-10  6:06       ` Stefan Priebe - Profihost AG [this message]
2011-10-10 13:26       ` Christoph Hellwig
2011-10-10 18:37         ` Tejun Heo
2011-10-19 11:16       ` Stefan Priebe - Profihost AG
2011-10-19 11:34         ` Christoph Hellwig
2011-10-19 13:10           ` Stefan Priebe - Profihost AG
2011-10-06 18:33 ` [PATCH 4/4] xfs: add AIL pushing tracepoints Christoph Hellwig
2011-10-07 22:18   ` Alex Elder
2011-10-10  1:45   ` Dave Chinner
  -- strict thread matches above, loose matches on Subject: below --
2011-10-11 15:14 [PATCH 0/4] fix AIL pushing under heavy concurrent metadata loads V2 Christoph Hellwig
2011-10-11 15:14 ` [PATCH 3/4] xfs: revert to using a kthread for AIL pushing Christoph Hellwig

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=4E928B61.8080107@profihost.ag \
    --to=s.priebe@profihost.ag \
    --cc=hch@infradead.org \
    --cc=markus@trippelsdorf.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.