On 01/23/17 11:47, Christophe Milard wrote:
> Fixing failure due to lack of huge pages.
> Fixes: https://bugs.linaro.org/show_bug.cgi?id=2842
> 
> Signed-off-by: Christophe Milard <christophe.mil...@linaro.org>
> ---
>  platform/linux-generic/_ishm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c
> index f889834..3797f20 100644
> --- a/platform/linux-generic/_ishm.c
> +++ b/platform/linux-generic/_ishm.c
> @@ -547,7 +547,7 @@ static void *do_map(int block_index, uint64_t len, 
> uint32_t align,
>               addr = alloc_fragment(len, block_index, align, &fragment);
>               if (!addr) {
>                       ODP_ERR("alloc_fragment failed.\n");
> -                     if (new_block->filename[0]) {
> +                     if (!new_block->external_fd) {
>                               close(*fd);
>                               *fd = -1;
>                               delete_file(new_block);
> @@ -562,7 +562,7 @@ static void *do_map(int block_index, uint64_t len, 
> uint32_t align,
>       if (mapped_addr == NULL) {
>               if (flags & _ODP_ISHM_SINGLE_VA)
>                       free_fragment(fragment);
> -             if (new_block->filename[0]) {
> +             if (!new_block->external_fd) {
>                       close(*fd);
>                       *fd = -1;
>                       delete_file(new_block);
> 

default setting for:
Ubuntu 16.04.1 LTS

f4df4d24c6 linux-gen: _ishm: fix normal page fallback
03aafc3 helper: remove dependence on test dir
19a457a helper: move thread implementation under platform
7025b1b helper: cleanup Linux rename to thread
0f18e31 configure: use helper configure.m4
3875d6e update API version number from v1.12.0.0 to v1.13.0.024c6
linux-gen: _ishm: fix normal page fallback
03aafc3 helper: remove dependence on test dir
19a457a helper: move thread implementation under platform
7025b1b helper: cleanup Linux rename to thread
0f18e31 configure: use helper configure.m4
3875d6e update API version number from v1.12.0.0 to v1.13.0.0

root@ubuntu:/opt/odp.git# cat
./test/common_plat/performance/odp_pktio_perf.log
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishm.c:859:_odp_ishm_reserve():No huge pages, fall back to normal
pages. check: /proc/sys/vm/nr_hugepages.
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
_ishmphy.c:128:_odp_ishmphy_map():mmap failed:Cannot allocate memory
FAIL odp_pktio_perf (exit status: 135)
root@ubuntu:/opt/odp.git# free
              total        used        free      shared  buff/cache
available
Mem:        8104960       85984     6965088        8772     1053888
7789072
Swap:             0           0           0
root@ubuntu:/opt/odp.git# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs
(rw,nosuid,relatime,size=4040932k,nr_inodes=1010233,mode=755)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=810496k,mode=755)
/dev/vdb1 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup
(rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs
(rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/pids type cgroup
(rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup
(rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup
(rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup
(rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/blkio type cgroup
(rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup
(rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup
(rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup
(rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/freezer type cgroup
(rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup
(rw,nosuid,nodev,noexec,relatime,devices)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs
(rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/vdb15 on /boot/efi type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
lxcfs on /var/lib/lxcfs type fuse.lxcfs
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
tmpfs on /run/user/1001 type tmpfs
(rw,nosuid,nodev,relatime,size=810496k,mode=700,uid=1001,gid=1001)
root@ubuntu:/opt/odp.git#

Reply via email to