public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: XFS Mailing List <xfs@oss.sgi.com>
Cc: hch@lst.de
Subject: [PATCH 2/2] xfs: use scalable vmap API
Date: Tue, 16 Mar 2010 13:55:56 -0500	[thread overview]
Message-ID: <1268765756.1951.27.camel@doink> (raw)

Re-apply a commit that had been reverted due to regressions
that have since been fixed.

    From 95f8e302c04c0b0c6de35ab399a5551605eeb006 Mon Sep 17 00:00:00 2001
    From: Nick Piggin <npiggin@suse.de>
    Date: Tue, 6 Jan 2009 14:43:09 +1100

    Implement XFS's large buffer support with the new vmap APIs. See the vmap
    rewrite (db64fe02) for some numbers. The biggest improvement that comes from
    using the new APIs is avoiding the global KVA allocation lock on every call.

    Signed-off-by: Nick Piggin <npiggin@suse.de>
    Reviewed-by: Christoph Hellwig <hch@infradead.org>
    Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>

Only modifications here were a minor reformat, plus making the patch
apply given the new use of xfs_buf_is_vmapped().

Modified-by: Alex Elder <aelder@sgi.com>

---
 fs/xfs/linux-2.6/xfs_buf.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: b/fs/xfs/linux-2.6/xfs_buf.c
===================================================================
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -268,7 +268,8 @@ xfs_buf_free(
 		uint		i;
 
 		if (xfs_buf_is_vmapped(bp))
-			vunmap(bp->b_addr - bp->b_offset);
+			vm_unmap_ram(bp->b_addr - bp->b_offset,
+					bp->b_page_count);
 
 		for (i = 0; i < bp->b_page_count; i++) {
 			struct page	*page = bp->b_pages[i];
@@ -388,8 +389,8 @@ _xfs_buf_map_pages(
 		bp->b_addr = page_address(bp->b_pages[0]) + bp->b_offset;
 		bp->b_flags |= XBF_MAPPED;
 	} else if (flags & XBF_MAPPED) {
-		bp->b_addr = vmap(bp->b_pages, bp->b_page_count,
-					VM_MAP, PAGE_KERNEL);
+		bp->b_addr = vm_map_ram(bp->b_pages, bp->b_page_count,
+					-1, PAGE_KERNEL);
 		if (unlikely(bp->b_addr == NULL))
 			return -ENOMEM;
 		bp->b_addr += bp->b_offset;


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2010-03-16 18:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 18:55 Alex Elder [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-10-21  8:25 [patch 1/2] xfs: remove old vmap cache Nick Piggin
2008-10-21  8:27 ` [patch 2/2] xfs: use scalable vmap API Nick Piggin
2008-10-21 12:09   ` Christoph Hellwig
2008-10-22  9:30     ` Nick Piggin
2010-01-19 12:15       ` Christoph Hellwig
2010-01-25  7:54         ` Nick Piggin
2010-01-25  8:17           ` Christoph Hellwig
2010-01-25  8:33             ` Nick Piggin
2010-01-25 12:37               ` Nick Piggin
2010-01-25 12:39                 ` Christoph Hellwig
2010-01-25 21:34                 ` Christoph Hellwig
2010-01-27  8:38                   ` Nick Piggin
2010-02-01 11:01                     ` Christoph Hellwig
2010-02-01 11:28                       ` Nick Piggin
2010-01-25  8:30           ` Nick Piggin

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=1268765756.1951.27.camel@doink \
    --to=aelder@sgi.com \
    --cc=hch@lst.de \
    --cc=xfs@oss.sgi.com \
    /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