summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-11-09 16:31:03 -0800
committerBrian Behlendorf <[email protected]>2011-11-09 19:36:30 -0800
commitfe71c0e5677d35cbdb3a6bf0a81c71d12a2aff4a (patch)
treee492852375a4993ea23eb05b28c6dc03b60fcd1a /module
parent0d0b523728b348b2d762fd9b27511ed9b138607b (diff)
Linux 3.1 compat, shrink_*cache_memory
As of Linux 3.1 the shrink_dcache_memory and shrink_icache_memory functions have been removed. This same task is now accomplished more cleanly with per super block shrinkers. This unfortunately leaves us no easy way to support the dnlc_reduce_cache() function. This support has always been entirely optional. So when no reasonable interface is available allow the dnlc_reduce_cache() function to effectively become a no-op. The downside of this change is that it will prevent the zfs arc meta data limts from being enforced. However, the current zfs implementation in this regard is already flawed and needs to be reworked. If the arc needs to enfore a meta data limit it will need to be extended to coordinate directly with the zpl. This will allow us to drop all this compatibility code and get more fine grained control over the cache management. Signed-off-by: Brian Behlendorf <[email protected]> Issue #52
Diffstat (limited to 'module')
-rw-r--r--module/spl/spl-kmem.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
index b3c054a95..1d2fa9053 100644
--- a/module/spl/spl-kmem.c
+++ b/module/spl/spl-kmem.c
@@ -2123,21 +2123,15 @@ spl_kmem_init_kallsyms_lookup(void)
#endif /* HAVE_INVALIDATE_INODES */
#ifndef HAVE_SHRINK_DCACHE_MEMORY
+ /* When shrink_dcache_memory_fn == NULL support is disabled */
shrink_dcache_memory_fn = (shrink_dcache_memory_t)
- spl_kallsyms_lookup_name("shrink_dcache_memory");
- if (!shrink_dcache_memory_fn) {
- printk(KERN_ERR "Error: Unknown symbol shrink_dcache_memory\n");
- return -EFAULT;
- }
+ spl_kallsyms_lookup_name("shrink_dcache_memory");
#endif /* HAVE_SHRINK_DCACHE_MEMORY */
#ifndef HAVE_SHRINK_ICACHE_MEMORY
+ /* When shrink_icache_memory_fn == NULL support is disabled */
shrink_icache_memory_fn = (shrink_icache_memory_t)
- spl_kallsyms_lookup_name("shrink_icache_memory");
- if (!shrink_icache_memory_fn) {
- printk(KERN_ERR "Error: Unknown symbol shrink_icache_memory\n");
- return -EFAULT;
- }
+ spl_kallsyms_lookup_name("shrink_icache_memory");
#endif /* HAVE_SHRINK_ICACHE_MEMORY */
return 0;