aboutsummaryrefslogtreecommitdiffstats
path: root/config/spl-build.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/spl-build.m4')
-rw-r--r--config/spl-build.m432
1 files changed, 32 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index 72bb3258e..94c7f3e74 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -76,6 +76,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_3ARGS_FILE_FSYNC
SPL_AC_EXPORTED_RWSEM_IS_LOCKED
SPL_AC_KERNEL_INVALIDATE_INODES
+ SPL_AC_SHRINK_DCACHE_MEMORY
+ SPL_AC_SHRINK_ICACHE_MEMORY
])
AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
@@ -1717,3 +1719,33 @@ AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [
[invalidate_inodes() is available])],
[])
])
+
+dnl #
+dnl # 2.6.xx API compat,
+dnl # There currently exists no exposed API to partially shrink the dcache.
+dnl # The expected mechanism to shrink the cache is a registered shrinker
+dnl # which is called during memory pressure.
+dnl #
+AC_DEFUN([SPL_AC_SHRINK_DCACHE_MEMORY], [
+ SPL_CHECK_SYMBOL_EXPORT(
+ [shrink_dcache_memory],
+ [fs/dcache.c],
+ [AC_DEFINE(HAVE_SHRINK_DCACHE_MEMORY, 1,
+ [shrink_dcache_memory() is available])],
+ [])
+])
+
+dnl #
+dnl # 2.6.xx API compat,
+dnl # There currently exists no exposed API to partially shrink the icache.
+dnl # The expected mechanism to shrink the cache is a registered shrinker
+dnl # which is called during memory pressure.
+dnl #
+AC_DEFUN([SPL_AC_SHRINK_ICACHE_MEMORY], [
+ SPL_CHECK_SYMBOL_EXPORT(
+ [shrink_icache_memory],
+ [fs/inode.c],
+ [AC_DEFINE(HAVE_SHRINK_ICACHE_MEMORY, 1,
+ [shrink_icache_memory() is available])],
+ [])
+])