vm: enable filemap=1 by default

. turns on mmap() functionality for files by default
	. also causes exec() to use it to map in executables
	  without copying and with sharing those pages with the
	  disk cache and other instances of the executable

Change-Id: Idb94dfe110eed916cf83b12c45e1a77241a2cee5
This commit is contained in:
Ben Gras 2013-09-13 12:05:50 +00:00
parent 4f52c9ea2e
commit 566ee1efd5
2 changed files with 6 additions and 0 deletions

View File

@ -322,6 +322,7 @@ void init_vm(void)
}
/* Turn file mmap on? */
enable_filemap=1; /* yes by default */
env_parse("filemap", "d", 0, &enable_filemap, 0, 1);
/* Sanity check */

View File

@ -29,7 +29,12 @@ alltests=" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
tests_no=`expr 0`
# test mmap only if enabled in sysenv
filemap=1 # the default is on
if sysenv filemap >/dev/null
then filemap=`sysenv filemap`
fi
if [ "$filemap" -ne 0 ]
then alltests="$alltests 74"
fi