diff options
author | Brian Behlendorf <[email protected]> | 2011-03-30 17:44:35 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-04-06 20:06:03 -0700 |
commit | e76f4bf11d54479fe767d9647a10e8b98d7ffc4f (patch) | |
tree | 213970e408e6c9b808184abd7fb7e3920cee0c52 /configure | |
parent | 83150861e610701d44510816e2062bcf407f51ab (diff) |
Add dnlc_reduce_cache() support
Provide the dnlc_reduce_cache() function which attempts to prune
cached entries from the dcache and icache. After the entries are
pruned any slabs which they may have been using are reaped.
Note the API takes a reclaim percentage but we don't have easy
access to the total number of cache entries to calculate the
reclaim count. However, in practice this doesn't need to be
exactly correct. We simply need to reclaim some useful fraction
(but not all) of the cache. The caller can determine if more
needs to be done.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 164 |
1 files changed, 164 insertions, 0 deletions
@@ -15462,6 +15462,88 @@ _ACEOF fi + + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5 +$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } + grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_DCACHE_MEMORY 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_DCACHE_MEMORY 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5 +$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; } + grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_ICACHE_MEMORY 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_ICACHE_MEMORY 1 +_ACEOF + + fi + + ;; user) @@ -19285,6 +19367,88 @@ _ACEOF + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5 +$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; } + grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_DCACHE_MEMORY 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_DCACHE_MEMORY 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5 +$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; } + grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_ICACHE_MEMORY 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK_ICACHE_MEMORY 1 +_ACEOF + + fi + + + if test "x$AWK" != xgawk; then |