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

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

Advertisement

Kernel v2.1.100 /fs/dcache.c

Filename:/fs/dcache.c
Lines Added:7
Lines Deleted:2
Also changed in: (Previous) 2.1.99  2.1.95  2.1.93  2.1.92  2.1.85  2.1.81 
(Following) 2.1.110  2.1.111  2.1.116  2.1.117  2.1.118  2.1.132 

Location
[  2.1.100
  [  fs
     o  dcache.c

Patch

diff -u --recursive --new-file v2.1.99/linux/fs/dcache.c linux/fs/dcache.c
--- v2.1.99/linux/fs/dcache.c   Sat May  2 14:19:53 1998
+++ linux/fs/dcache.c   Sat May  2 14:07:52 1998
@@ -430,12 +430,17 @@
  * more memory, but aren't really sure how much. So we
  * carefully try to free a _bit_ of our dcache, but not
  * too much.
+ *
+ * Priority:
+ *   0 - very urgent: schrink everything
+ *  ...
+ *   6 - base-level: try to shrink a bit.
  */
-void shrink_dcache_memory(void)
+void shrink_dcache_memory(int priority, unsigned int gfp_mask)
 {
    int count = select_dcache(32, 8);
    if (count)
-      prune_dcache(count);
+      prune_dcache((count << 6) >> priority);
 }
 
 #define NAME_ALLOC_LEN(len)   ((len+16) & ~15)


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