stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <oferh@marvell.com>
To: <shli@kernel.org>
Cc: <nadavh@marvell.com>, <linux-raid@vger.kernel.org>,
	Ofer Heifetz <oferh@marvell.com>, <stable@vger.kernel.org>
Subject: [PATCH] md/raid5: add thread_group worker async_tx_issue_pending_all
Date: Mon, 24 Jul 2017 09:17:40 +0300	[thread overview]
Message-ID: <1500877060-12256-1-git-send-email-oferh@marvell.com> (raw)

From: Ofer Heifetz <oferh@marvell.com>

Since thread_group worker and raid5d kthread are not in sync, if
worker writes stripe before raid5d then requests will be waiting
for issue_pendig.

Issue observed when building raid5 with ext4, in some build runs
jbd2 would get hung and requests were waiting in the HW engine
waiting to be issued.

Fix this by adding a call to async_tx_issue_pending_all in the
raid5_do_work.

Signed-off-by: Ofer Heifetz <oferh@marvell.com>
Cc: stable@vger.kernel.org
---
 drivers/md/raid5.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index aeeb8d6..3c0b924 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -6237,6 +6237,8 @@ static void raid5_do_work(struct work_struct *work)
 	pr_debug("%d stripes handled\n", handled);
 
 	spin_unlock_irq(&conf->device_lock);
+
+	async_tx_issue_pending_all();
 	blk_finish_plug(&plug);
 
 	pr_debug("--- raid5worker inactive\n");
-- 
1.9.1

             reply	other threads:[~2017-07-24  6:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24  6:17 oferh [this message]
2017-07-24 14:48 ` [PATCH] md/raid5: add thread_group worker async_tx_issue_pending_all Shaohua Li

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=1500877060-12256-1-git-send-email-oferh@marvell.com \
    --to=oferh@marvell.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=nadavh@marvell.com \
    --cc=shli@kernel.org \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).