stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md/raid5: add thread_group worker async_tx_issue_pending_all
@ 2017-07-24  6:17 oferh
  2017-07-24 14:48 ` Shaohua Li
  0 siblings, 1 reply; 2+ messages in thread
From: oferh @ 2017-07-24  6:17 UTC (permalink / raw)
  To: shli; +Cc: nadavh, linux-raid, Ofer Heifetz, stable

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

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

* Re: [PATCH] md/raid5: add thread_group worker async_tx_issue_pending_all
  2017-07-24  6:17 [PATCH] md/raid5: add thread_group worker async_tx_issue_pending_all oferh
@ 2017-07-24 14:48 ` Shaohua Li
  0 siblings, 0 replies; 2+ messages in thread
From: Shaohua Li @ 2017-07-24 14:48 UTC (permalink / raw)
  To: oferh; +Cc: nadavh, linux-raid, stable

On Mon, Jul 24, 2017 at 09:17:40AM +0300, oferh@marvell.com wrote:
> 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.

applied, thanks!
 
> 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
> 

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

end of thread, other threads:[~2017-07-24 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24  6:17 [PATCH] md/raid5: add thread_group worker async_tx_issue_pending_all oferh
2017-07-24 14:48 ` Shaohua Li

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