lkml.org 
[lkml]   [2006]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [stable] [PATCH 25/25] generic_file_buffered_write(): deadlock on vectored write
    * Chris Wright (chrisw@sous-sol.org) wrote:
    > From: Vladimir V. Saveliev <vs@namesys.com>
    >
    > generic_file_buffered_write() prefaults in user pages in order to avoid
    > deadlock on copying from the same page as write goes to.
    >
    > However, it looks like there is a problem when write is vectored:
    > fault_in_pages_readable brings in current segment or its part (maxlen).
    > OTOH, filemap_copy_from_user_iovec is called to copy number of bytes
    > (bytes) which may exceed current segment, so filemap_copy_from_user_iovec
    > switches to the next segment which is not brought in yet. Pagefault is
    > generated. That causes the deadlock if pagefault is for the same page
    > write goes to: page being written is locked and not uptodate, pagefault
    > will deadlock trying to lock locked page.

    This is dropped for now, as it causes another problem with 0 length
    iovecs. Andrew has written a fix and once it's baked in Linus' tree for
    a bit we can take back this one plus the fix.

    thanks,
    -chris
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-06-29 20:28    [W:4.084 / U:1.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site