public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] UML: UBD: Fix for processes stuck in D state forever in UserModeLinux
@ 2014-08-23 13:47 Thorsten Knabe
  2014-08-23 15:34 ` Richard Weinberger
  0 siblings, 1 reply; 9+ messages in thread
From: Thorsten Knabe @ 2014-08-23 13:47 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-kernel, Thomas Meyer, Valdis.Kletnieks, linux

From: Thorsten Knabe <linux@thorsten-knabe.de>

UML: UBD: Fix for processes stuck in D state forever in UserModeLinux.

Starting with Linux 3.12 processes get stuck in D state forever in
UserModeLinux under sync heavy workloads. This bug was introduced by
commit 805f11a0d5 (um: ubd: Add REQ_FLUSH suppport).
Fix bug by adding a check if FLUSH request was successfully submitted to
the I/O thread and keeping the FLUSH request on the request queue on
submission failures.

Fixes: 805f11a0d5 (um: ubd: Add REQ_FLUSH suppport)
Signed-off-by: Thorsten Knabe <linux@thorsten-knabe.de>
---
Patch applies to 3.16.1.

diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 3716e69..b7d2840 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -1277,7 +1277,7 @@ static void do_ubd_request(struct request_queue *q)

 	while(1){
 		struct ubd *dev = q->queuedata;
-		if(dev->end_sg == 0){
+		if(dev->request == NULL){
 			struct request *req = blk_fetch_request(q);
 			if(req == NULL)
 				return;
@@ -1299,7 +1299,8 @@ static void do_ubd_request(struct request_queue *q)
 				return;
 			}
 			prepare_flush_request(req, io_req);
-			submit_request(io_req, dev);
+			if (submit_request(io_req, dev) == false)
+				return;
 		}

 		while(dev->start_sg < dev->end_sg){




-- 
___
 |        | /                 E-Mail: linux@thorsten-knabe.de
 |horsten |/\nabe                WWW: http://linux.thorsten-knabe.de

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

end of thread, other threads:[~2014-09-16 16:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-23 13:47 [PATCH] UML: UBD: Fix for processes stuck in D state forever in UserModeLinux Thorsten Knabe
2014-08-23 15:34 ` Richard Weinberger
2014-08-23 17:43   ` Thorsten Knabe
2014-08-24 12:11     ` Richard Weinberger
2014-08-24 23:02       ` Thorsten Knabe
2014-08-25 13:25         ` Richard Weinberger
2014-08-25 14:00           ` Thorsten Knabe
2014-08-25 14:04             ` Richard Weinberger
2014-09-16 16:50               ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox