Branch: refs/heads/master
  Home:   https://github.com/Linaro/odp
  Commit: c46f54d8c708d6335b0288ff4a5aad3a3b93e41c
      
https://github.com/Linaro/odp/commit/c46f54d8c708d6335b0288ff4a5aad3a3b93e41c
  Author: Josep Puigdemont <josep.puigdem...@linaro.org>
  Date:   2018-09-12 (Wed, 12 Sep 2018)

  Changed paths:
    M config/odp-linux-generic.conf
    M platform/linux-generic/odp_ishm.c

  Log Message:
  -----------
  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.puigdem...@linaro.org>
Reviewed-and-tested-by: Matias Elo <matias....@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>


  Commit: c5789c8633254aca7e1d978d1e1f0ad7077e7e2c
      
https://github.com/Linaro/odp/commit/c5789c8633254aca7e1d978d1e1f0ad7077e7e2c
  Author: Josep Puigdemont <josep.puigdem...@linaro.org>
  Date:   2018-09-12 (Wed, 12 Sep 2018)

  Changed paths:
    M config/odp-linux-generic.conf
    M platform/linux-generic/odp_ishm.c

  Log Message:
  -----------
  linux-gen: ishm: make huge page cache size dynamic

Signed-off-by: Josep Puigdemont <josep.puigdem...@linaro.org>
Reviewed-and-tested-by: Matias Elo <matias....@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>


Compare: https://github.com/Linaro/odp/compare/0b9a1a2e8334...c5789c863325
      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

Reply via email to