Skip to contentSkip to conversation

UML - AIO deadlock avoidance

PATCH New Jeff Dike 1 participant 1 message Apr 12, 2007 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 5/6 UML - AIO deadlock avoidance

Allow deadlocks to be avoided in the AIO code by setting the pipe to the I/O thread non-blocking.

--

 arch/um/os-Linux/aio.c |    5 +++++
 1 file changed, 5 insertions(+)
arch/um/os-Linux/aio.c +5 -0
Index: linux-2.6.21-mm/arch/um/os-Linux/aio.c
===================================================================
@@ -221,6 +221,11 @@ static int init_aio_24(void)
 
 	aio_req_fd_w = fds[0];
 	aio_req_fd_r = fds[1];
+
+	err = os_set_fd_block(aio_req_fd_w, 0);
+	if(err)
+		goto out_close_pipe;
+
 	err = run_helper_thread(not_aio_thread, NULL,
 				CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0);
 	if(err < 0)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel