From: Dave Hansen <dave@sr71.net>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, Alexander Viro <viro@zeniv.linux.org.uk>,
Rik van Riel <riel@redhat.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Matt Helsley <matt.helsley@gmail.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
Lei Li <lilei@linux.vnet.ibm.com>,
Leonardo Garcia <lagarcia@linux.vnet.ibm.com>
Subject: Re: [RFC PATCH 1/2] vmsplice unmap gifted pages for recipient
Date: Fri, 26 Jul 2013 09:47:26 -0700 [thread overview]
Message-ID: <51F2A81E.5050500@sr71.net> (raw)
In-Reply-To: <20130726151621.GA5037@linux.vnet.ibm.com>
On 07/26/2013 08:16 AM, Robert Jennings wrote:
>>> > > + if ((spd->flags & SPLICE_F_MOVE) &&
>>> > > + !buf->offset && (buf->len == PAGE_SIZE))
>>> > > + /* Can move page aligned buf */
>>> > > + zap_buf_page(useraddr);
>>> > > buf->flags |= PIPE_BUF_FLAG_GIFT;
>>> > > + }
>> >
>> > There isn't quite enough context here, but is it going to do this
>> > zap_buf_page() very often? Seems a bit wasteful to do the up/down and
>> > find_vma() every trip through the loop.
> The call to zap_buf_page() is in a loop where each pipe buffer is being
> processed, but in that loop we have a pipe_wait() where we schedule().
> So as things are structured I don't have the ability to hold mmap_sem
> for multiple find_vma() calls.
You can hold a semaphore over a schedule(). :)
You could also theoretically hold mmap_sem and only drop it on actual
cases when you reschedule if you were afraid of holding mmap_sem for
long periods of time (even though it's a read).
--
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>
next prev parent reply other threads:[~2013-07-26 16:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 17:21 [RFC PATCH 0/2] vmpslice support for zero-copy gifting of pages Robert Jennings
2013-07-25 17:21 ` [RFC PATCH 1/2] vmsplice unmap gifted pages for recipient Robert Jennings
2013-07-25 17:30 ` Dave Hansen
2013-07-26 15:16 ` Robert Jennings
2013-07-26 16:47 ` Dave Hansen [this message]
2013-07-25 17:21 ` [RFC PATCH 2/2] Add limited zero copy to vmsplice Robert Jennings
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=51F2A81E.5050500@sr71.net \
--to=dave@sr71.net \
--cc=aarcange@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=lagarcia@linux.vnet.ibm.com \
--cc=lilei@linux.vnet.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matt.helsley@gmail.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=riel@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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