lkml.org 
[lkml]   [2006]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] splice: add support for SPLICE_F_MOVE flag
Andrew Morton <akpm@osdl.org> wrote:
>
> static void page_cache_pipe_buf_unmap(struct pipe_inode_info *info,
> > struct pipe_buffer *buf)
> > {
> > - unlock_page(buf->page);
> > + if (!buf->stolen)
> > + unlock_page(buf->page);
> > kunmap(buf->page);
> > }
>
> There go our chances of ever getting rid of kmap(). Is it not feasible to
> use atomic kmaps throughout this code?

What are the kmaps for, anyway? afaict they're doing the
kmap-the-page-while-we-run-some-a_ops thing which ceased being a
requirement 3-4 years ago.

The general approach we should take is that the code which actually
modifies a page's contents is the code which is responsible for kmapping
that page. Use an atomic kmap, memcpy-or-memset, atomic kunmap. Just four
or five lines.

If we can do that, pipe_buf_operations.map/unmap can be removed.
-
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-03-31 05:02    [W:0.307 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site