This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via dccf4d8fcba4f912d4844b6d4a30f045b1e12651 (commit) from cd289985b5247fe9f1d1f58753717bd5659bd7d0 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit dccf4d8fcba4f912d4844b6d4a30f045b1e12651 Author: Ilias Apalodimas ilias.apalodimas@linaro.org Date: Sat Dec 23 13:49:01 2017 +0200
linux-gen: _ishm: proper alignment for current page size
On systems compiled without hugetlb odp_init_global() failed. On systems with hugetlb alignment was superfluous. Fixes https://bugs.linaro.org/show_bug.cgi?id=3478
Signed-off-by: Ilias Apalodimas ilias.apalodimas@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index 82465bc5..bce4e402 100644 --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@ -864,8 +864,8 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd, * the same address every where, otherwise alignment may be * be wrong for some process */ hp_align = align; - if (hp_align <= odp_sys_huge_page_size()) - hp_align = odp_sys_huge_page_size(); + if (hp_align <= page_hp_size) + hp_align = page_hp_size; else flags |= _ODP_ISHM_SINGLE_VA;
@@ -1441,6 +1441,8 @@ int _odp_ishm_init_global(void) void *spce_addr; int i; uid_t uid; + char *hp_dir = odp_global_data.hugepage_info.default_huge_page_dir; + uint64_t align;
odp_global_data.main_pid = getpid(); odp_global_data.shm_dir = getenv("ODP_SHM_DIR"); @@ -1466,13 +1468,13 @@ int _odp_ishm_init_global(void) return -1; }
- if (!odp_global_data.hugepage_info.default_huge_page_dir) + if (!hp_dir) { ODP_DBG("NOTE: No support for huge pages\n"); - else { - ODP_DBG("Huge pages mount point is: %s\n", - odp_global_data.hugepage_info.default_huge_page_dir); - _odp_ishm_cleanup_files( - odp_global_data.hugepage_info.default_huge_page_dir); + align = odp_sys_page_size(); + } else { + ODP_DBG("Huge pages mount point is: %s\n", hp_dir); + _odp_ishm_cleanup_files(hp_dir); + align = odp_sys_huge_page_size(); }
_odp_ishm_cleanup_files(odp_global_data.shm_dir); @@ -1504,8 +1506,7 @@ int _odp_ishm_init_global(void) *reserve the address space for _ODP_ISHM_SINGLE_VA reserved blocks, * only address space! */ - spce_addr = _odp_ishmphy_book_va(ODP_CONFIG_ISHM_VA_PREALLOC_SZ, - odp_sys_huge_page_size()); + spce_addr = _odp_ishmphy_book_va(ODP_CONFIG_ISHM_VA_PREALLOC_SZ, align); if (!spce_addr) { ODP_ERR("unable to reserve virtual space\n."); goto init_glob_err3;
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/_ishm.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
hooks/post-receive