Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.16 /mm/filemap.c

Filename:/mm/filemap.c
Lines Added:9
Lines Deleted:3
Also changed in: (Previous) 2.4.16-pre1  2.4.15-greased-turkey  2.4.15-pre9  2.4.15-pre8  2.4.15-pre7  2.4.15-pre6 
(Following) 2.4.17-pre6  2.4.17-pre7  2.4.17-pre8  2.4.17-rc1  2.4.17-rc2  2.4.17 

Location
[  2.4.16
  [  mm
     o  filemap.c

Patch

diff -Nur linux-2.4.15/mm/filemap.c linux/mm/filemap.c
--- linux-2.4.15/mm/filemap.c   Wed Nov 21 20:07:25 2001
+++ linux/mm/filemap.c   Sat Nov 24 16:22:06 2001
@@ -47,6 +47,12 @@
 unsigned int page_hash_bits;
 struct page **page_hash_table;
 
+int vm_max_readahead = 31;
+int vm_min_readahead = 3;
+EXPORT_SYMBOL(vm_max_readahead);
+EXPORT_SYMBOL(vm_min_readahead);
+
+
 spinlock_t pagecache_lock ____cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
 /*
  * NOTE: to avoid deadlocking you must never acquire the pagemap_lru_lock 
@@ -1134,7 +1140,7 @@
 static inline int get_max_readahead(struct inode * inode)
 {
    if (!inode->i_dev || !max_readahead[MAJOR(inode->i_dev)])
-      return MAX_READAHEAD;
+      return vm_max_readahead;
    return max_readahead[MAJOR(inode->i_dev)][MINOR(inode->i_dev)];
 }
 
@@ -1317,8 +1323,8 @@
       if (filp->f_ramax < needed)
          filp->f_ramax = needed;
 
-      if (reada_ok && filp->f_ramax < MIN_READAHEAD)
-            filp->f_ramax = MIN_READAHEAD;
+      if (reada_ok && filp->f_ramax < vm_min_readahead)
+            filp->f_ramax = vm_min_readahead;
       if (filp->f_ramax > max_readahead)
          filp->f_ramax = max_readahead;
    }


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.