From: "Michael S. Tsirkin" <mst@redhat.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Dan Williams <dan.j.williams@intel.com>,
"Michael S. Tsirkin" <mst@redhat.com>, Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] dma: get_user_pages -> get_user_pages_fast
Date: Mon, 11 Oct 2010 18:53:10 +0200 [thread overview]
Message-ID: <20101011165310.GA5122@redhat.com> (raw)
There doesn't seem to be any advantage to using
get_user_pages, so switch iovlock to get_user_pages_fast
instead.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
Lightly tested. This patch is on top of the bugfix patch I posted
previously.
drivers/dma/iovlock.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c
index 21ed8f3..c6917e8 100644
--- a/drivers/dma/iovlock.c
+++ b/drivers/dma/iovlock.c
@@ -95,17 +95,11 @@ struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len)
pages += page_list->nr_pages;
/* pin pages down */
- down_read(¤t->mm->mmap_sem);
- ret = get_user_pages(
- current,
- current->mm,
+ ret = get_user_pages_fast(
(unsigned long) iov[i].iov_base,
page_list->nr_pages,
1, /* write */
- 0, /* force */
- page_list->pages,
- NULL);
- up_read(¤t->mm->mmap_sem);
+ page_list->pages);
if (unlikely(ret < 0))
goto unpin;
--
1.7.3-rc1
next reply other threads:[~2010-10-11 16:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-11 16:53 Michael S. Tsirkin [this message]
2010-10-11 17:34 ` [PATCH] dma: get_user_pages -> get_user_pages_fast Peter Zijlstra
2010-10-12 11:52 ` Michael S. Tsirkin
2010-10-12 12:08 ` Peter Zijlstra
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=20101011165310.GA5122@redhat.com \
--to=mst@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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