Re: [dpdk-dev] [PATCH v6 51/70] mem: add support for mapping hugepages at runtime

2018-04-17 Thread Yongseok Koh


> On Apr 17, 2018, at 12:20 AM, Thomas Monjalon  wrote:
> 
> 17/04/2018 04:06, Yongseok Koh:
>> There's a bug in the old RedHat release:
>> Bug 1476120 - glibc headers don't include linux/falloc.h, and therefore 
>> doesn't include fallocate() flags [1]
>> 
>> How about adding "#include " ahead of fcntl.h?  I'm quite 
>> lazy
>> to update my host and using CentOS 7.2.1511, then it failed to compile due to
>> this bug.
> 
> It's strange, it is already fixed (at least in master).
> Please can you double check what's wrong?

My bad, I was still following Anatoly's GitHub.
I didn't notice it's been merged.

I'm seeing it's been fixed.

Thanks,
Yongseok

>> [1] 
>> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1476120&data=02%7C01%7Cyskoh%40mellanox.com%7C0bcb62d00a9849c3774608d5a433c19f%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636595464554210477&sdata=El%2F8eGX0Co%2FWeZuUQ%2FbSdId5xr%2BRTNw7GZ4NYr6JzSs%3D&reserved=0



Re: [dpdk-dev] [PATCH v6 51/70] mem: add support for mapping hugepages at runtime

2018-04-17 Thread Thomas Monjalon
17/04/2018 04:06, Yongseok Koh:
> There's a bug in the old RedHat release:
> Bug 1476120 - glibc headers don't include linux/falloc.h, and therefore 
> doesn't include fallocate() flags [1]
> 
> How about adding "#include " ahead of fcntl.h?  I'm quite lazy
> to update my host and using CentOS 7.2.1511, then it failed to compile due to
> this bug.

It's strange, it is already fixed (at least in master).
Please can you double check what's wrong?


> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1476120






Re: [dpdk-dev] [PATCH v6 51/70] mem: add support for mapping hugepages at runtime

2018-04-16 Thread Yongseok Koh

> On Apr 11, 2018, at 5:30 AM, Anatoly Burakov  
> wrote:
> 
> Nothing uses this code yet. The bulk of it is copied from old
> memory allocation code (linuxapp eal_memory.c). We provide an
> EAL-internal API to allocate either one page or multiple pages,
> guaranteeing that we'll get contiguous VA for all of the pages
> that we requested.
> 
> Not supported on FreeBSD.
> 
> Locking is done via fcntl() because that way, when it comes to
> taking out write locks or unlocking on deallocation, we don't
> have to keep original fd's around. Plus, using fcntl() gives us
> ability to lock parts of a file, which is useful for single-file
> segments, which are coming down the line.
> 
> Signed-off-by: Anatoly Burakov 
> Tested-by: Santosh Shukla 
> Tested-by: Hemant Agrawal 
> Tested-by: Gowrishankar Muthukrishnan 
> ---
[...]
> diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c 
> b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
> new file mode 100644
> index 000..45ea0ad
> --- /dev/null
> +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
> @@ -0,0 +1,429 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2017-2018 Intel Corporation
> + */
> +
> +#define _FILE_OFFSET_BITS 64
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 

There's a bug in the old RedHat release:
Bug 1476120 - glibc headers don't include linux/falloc.h, and therefore doesn't 
include fallocate() flags [1]

How about adding "#include " ahead of fcntl.h?  I'm quite lazy
to update my host and using CentOS 7.2.1511, then it failed to compile due to
this bug.


[1] https://bugzilla.redhat.com/show_bug.cgi?id=1476120

Thanks,
Yongseok