[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH v3 2/6] mm, directio: fix fork vs direct-io race (read(2) side IOW gup(write) side)
    On Tue, Apr 14, 2009 at 12:45:41PM -0400, Jeff Moyer wrote:
    > So, if you're continuously submitting async read I/O, you will starve
    > out the fork() call indefinitely. I agree that you want to allow

    IIRC rwsem good enough to stop the down_read when a down_write is
    blocked. Otherwise page fault flood in threads would also starve any
    mmap or similar call. Still with this approach fork will start to hang
    indefinitely waiting for I/O, making it an I/O bound call, and not a
    CPU call anymore, which may severely impact interactive-ness of

    As long as fork is useful in the first place to provide memory
    protection of different code with different
    memory-corruption-trust-levels (otherwise nobody should use fork at
    all, and vfork [or better spawn] should become the only option), then
    fork from a thread pool is also reasonable. Either fork is totally
    useless as a whole (which I wouldn't argue too much about), or if you
    agree fork makes any sense, it can also make sense if intermixed with
    clone(CLONE_VM) and hopefully it should behave CPU bound like CLONE_VM.

     \ /
      Last update: 2009-04-14 19:57    [W:0.031 / U:4.436 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site