[RFC:PATCH 06/09] For readahead, leave data in tail

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dave Kleikamp
Date: Thursday, November 8, 2007 - 12:47 pm

For readahead, leave data in tail

Don't unpack it until it's actually read.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
---

 mm/readahead.c |    5 +++++
 1 file changed, 5 insertions(+)

diff -Nurp linux005/mm/readahead.c linux006/mm/readahead.c
--- linux005/mm/readahead.c	2007-11-07 08:14:01.000000000 -0600
+++ linux006/mm/readahead.c	2007-11-08 10:49:46.000000000 -0600
@@ -16,6 +16,7 @@
 #include <linux/task_io_accounting_ops.h>
 #include <linux/pagevec.h>
 #include <linux/pagemap.h>
+#include <linux/vm_file_tail.h>
 
 void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
 {
@@ -147,6 +148,10 @@ __do_page_cache_readahead(struct address
 		if (page_offset > end_index)
 			break;
 
+		if ((page_offset == end_index) && vm_file_tail_packed(mapping))
+			/* Tail page is already packed */
+			break;
+
 		rcu_read_lock();
 		page = radix_tree_lookup(&mapping->page_tree, page_offset);
 		rcu_read_unlock();
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC:PATCH 00/09] VM File Tails, Dave Kleikamp, (Thu Nov 8, 12:47 pm)
[RFC:PATCH 01/09] Add tail to address space, Dave Kleikamp, (Thu Nov 8, 12:47 pm)
[RFC:PATCH 03/09] Release tail when inode is freed, Dave Kleikamp, (Thu Nov 8, 12:47 pm)
[RFC:PATCH 06/09] For readahead, leave data in tail, Dave Kleikamp, (Thu Nov 8, 12:47 pm)
[RFC:PATCH 09/09] VM tail statistics support, Dave Kleikamp, (Thu Nov 8, 12:48 pm)