Thread (2 messages) 2 messages, 2 authors, 2009-04-15

Re: [RFC][PATCH v3 4/6] aio: Don't inherit aio ring memory at fork

flat view

From: Jeff Moyer <hidden>
Date: 2009-04-14 16:01:50
Also in: linux-fsdevel, linux-mm, lkml

KOSAKI Motohiro [off-list ref] writes:
AIO folks, Am I missing anything?

===============
Subject: [RFC][PATCH] aio: Don't inherit aio ring memory at fork

Currently, mm_struct::ioctx_list member isn't copyed at fork. IOW aio context don't inherit at fork.
but only ring memory inherited. that's strange.

This patch mark DONTFORK to ring-memory too.
Well, given that clearly nobody relies on io contexts being copied to
the child, I think it's okay to make this change.  I think the current
behaviour violates the principal of least surprise, but I'm having a
hard time getting upset about that.  ;)
In addition, This patch has good side effect. it also fix
"get_user_pages() vs fork" problem.
Hmm, I don't follow you, here.  As I understand it, the get_user_pages
vs. fork problem has to do with the pages used for the actual I/O, not
the pages used to store the completion data.  So, could you elaborate a
bit on what you mean by the above statement?
I think "man fork" also sould be changed. it only say

       *  The child does not inherit outstanding asynchronous I/O operations from
          its parent (aio_read(3), aio_write(3)).
but aio_context_t (return value of io_setup(2)) also don't inherit in current implementaion.
I can certainly make that change, as I have other changes I need to push
to Michael, anyway.

Cheers,
Jeff

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help