diff options
author | Josep Puigdemont <josep.puigdemont@linaro.org> | 2018-08-27 16:37:15 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-09-12 17:36:54 +0300 |
commit | c46f54d8c708d6335b0288ff4a5aad3a3b93e41c (patch) | |
tree | bf99c3a8c141668c43162ab8bd7077b20615b96c /.codecov.yml | |
parent | 0b9a1a2e8334581126d4ece3fb4f9e019d88da0d (diff) |
linux-gen: ishm: implement huge page cache
With this patch, ODP will pre-allocate several huge pages at init
time. When memory is to be mapped into a huge page, one that was
pre-allocated will be used, if available, this way ODP won't have to
trap into the kernel to allocate huge pages.
The idea with this implementation is to trick ishm into thinking that
a file descriptor where to map the memory was provided, this way it
it won't try to allocate one itself. This file descriptor is one of
those previously allocated at init time. When the system is done with
this file descriptor, instead of closing it, it is put back into the
list of available huge pages, ready to be reused.
A collateral effect of this patch is that memory is not zeroed out
when it is reused.
WARNING: This patch will not work when using process mode threads.
For several reasons, this may not work when using ODP_ISHM_SINGLE_VA
either, so when this flag is set, the list of pre-allocated files is
not used.
By default ODP will not reserve any huge pages, to tell ODP to do that,
update the ODP configuration file with something like this:
shm: {
num_cached_hp = 32
}
Example usage:
$ echo odp.config
odp_implementation = "linux-generic"
config_file_version = "0.0.1"
shm: {
num_cached_hp = 32
}
$ ODP_CONFIG_FILE=odp.conf ./test/validation/api/shmem/shmem_main
This patch solves bug #3774:
https://bugs.linaro.org/show_bug.cgi?id=3774
Signed-off-by: Josep Puigdemont <josep.puigdemont@linaro.org>
Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to '.codecov.yml')
0 files changed, 0 insertions, 0 deletions