public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma: get_user_pages -> get_user_pages_fast
@ 2010-10-11 16:53 Michael S. Tsirkin
  2010-10-11 17:34 ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2010-10-11 16:53 UTC (permalink / raw)
  Cc: Dan Williams, Michael S. Tsirkin, Tejun Heo, linux-kernel

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(&current->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(&current->mm->mmap_sem);
+			page_list->pages);
 
 		if (unlikely(ret < 0))
 			goto unpin;
-- 
1.7.3-rc1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-12 12:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-11 16:53 [PATCH] dma: get_user_pages -> get_user_pages_fast Michael S. Tsirkin
2010-10-11 17:34 ` Peter Zijlstra
2010-10-12 11:52   ` Michael S. Tsirkin
2010-10-12 12:08     ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox