From: Andrew Morton <akpm@osdl.org>
To: linux-kernel@vger.kernel.org, axboe@suse.de, nickpiggin@yahoo.com.au
Subject: Re: [PATCH] splice: add support for SPLICE_F_MOVE flag
Date: Thu, 30 Mar 2006 18:59:56 -0800 [thread overview]
Message-ID: <20060330185956.54961b7b.akpm@osdl.org> (raw)
In-Reply-To: <20060330163544.72e50aab.akpm@osdl.org>
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.
next prev parent reply other threads:[~2006-03-31 3:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200603302109.k2UL9ET0012970@hera.kernel.org>
2006-03-31 0:35 ` Andrew Morton
2006-03-31 2:59 ` Andrew Morton [this message]
2006-03-31 7:08 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060330185956.54961b7b.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome