For readahead, leave data in tail
Don't unpack it until it's actually read.
Signed-off-by: Dave Kleikamp <[EMAIL PROTECTED]>
---
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 [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html