All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove certain calls for releasing page cache
@ 2014-07-30 20:42 Nicholas Krause
  2014-07-30 20:47 ` Josef Bacik
  2014-07-30 23:30 ` Dave Airlie
  0 siblings, 2 replies; 12+ messages in thread
From: Nicholas Krause @ 2014-07-30 20:42 UTC (permalink / raw)
  To: clm; +Cc: jbacik, linux-btrfs, linux-kernel

This patch removes the lines for releasing the page cache in certain
files as this may aid in perfomance with writes in the compression
rountines of btrfs. Please note that this patch has not been tested
on my own hardware due to no compression based btrfs volumes of my
own.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 fs/btrfs/compression.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 1daea0b..b55b0e1 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -1,4 +1,5 @@
 /*
+	
  * Copyright (C) 2008 Oracle.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -246,7 +247,6 @@ static noinline void end_compressed_writeback(struct inode *inode, u64 start,
 		}
 		for (i = 0; i < ret; i++) {
 			end_page_writeback(pages[i]);
-			page_cache_release(pages[i]);
 		}
 		nr_pages -= ret;
 		index += ret;
@@ -293,21 +293,6 @@ static void end_compressed_bio_write(struct bio *bio, int err)
 
 	end_compressed_writeback(inode, cb->start, cb->len);
 	/* note, our inode could be gone now */
-
-	/*
-	 * release the compressed pages, these came from alloc_page and
-	 * are not attached to the inode at all
-	 */
-	index = 0;
-	for (index = 0; index < cb->nr_pages; index++) {
-		page = cb->compressed_pages[index];
-		page->mapping = NULL;
-		page_cache_release(page);
-	}
-
-	/* finally free the cb struct */
-	kfree(cb->compressed_pages);
-	kfree(cb);
 out:
 	bio_put(bio);
 }
-- 
1.9.1


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

end of thread, other threads:[~2014-07-31 16:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30 20:42 [PATCH] Remove certain calls for releasing page cache Nicholas Krause
2014-07-30 20:47 ` Josef Bacik
2014-07-30 20:51   ` Zach Brown
2014-07-30 22:34     ` Nick Krause
2014-07-30 23:18       ` Josef Bacik
2014-07-30 23:30 ` Dave Airlie
2014-07-31  2:05   ` Nick Krause
2014-07-31  3:57     ` Dave Airlie
2014-07-31  4:14       ` Nick Krause
2014-07-31  5:53         ` Duncan
2014-07-31 10:11     ` Hugo Mills
2014-07-31 16:48       ` Nick Krause

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.