Re: [PATCH v4 1/1] eal/linux: reject mountpt not parent of --huge-dir

2023-01-11 Thread John Levon
his has been corrected by ensuring any matched mount point is either an > exact match or a parent path of --huge-dir. > > Fixes: 24d5a1ce6b85 ("eal/linux: allow hugetlbfs sub-directories") > Cc: john.le...@nutanix.com > Cc: sta...@dpdk.org > Signed-off-by: Ashish Sadanandan Reviewed-by: John Levon thanks john

Re: [PATCH v2 1/1] eal/linux: reject --huge-dir not parent of mountpt

2023-01-04 Thread John Levon
On Tue, Jan 03, 2023 at 05:00:30PM -0700, Ashish Sadanandan wrote: > The code added for allowing --huge-dir to specify hugetlbfs > sub-directories has a bug where it incorrectly matches mounts that > contain a prefix of the specified --huge-dir. Sorry for the trouble & thanks for the fix. > +

Re: [dpdk-dev] [PATCH] eal/linux: allow hugetlbfs sub-directories

2021-10-12 Thread John Levon
On Tue, Oct 12, 2021 at 09:03:09PM +0200, David Marchand wrote: > > diff --git a/doc/guides/rel_notes/release_21_11.rst > > b/doc/guides/rel_notes/release_21_11.rst > > index 54718ff367..9fe689356b 100644 > > --- a/doc/guides/rel_notes/release_21_11.rst > > +++ b/doc/guides/rel_notes/release_21_1

[dpdk-dev] [PATCH] eal/linux: allow hugetlbfs sub-directories

2021-10-12 Thread John Levon
ages/myapp, and /dev/hugepages/dpdk, I should be able to specify: --huge-dir=/dev/hugepages/dpdk/ and have DPDK only use that sub-directory. Fix the implementation to allow a sub-directory within a suitable hugetlbfs mountpoint to be specified, preferring the closest match. Signed-off-by: John Le

Re: [dpdk-dev] [PATCH v5 1/3] eal/linux: make hugetlbfs analysis reusable

2021-10-08 Thread John Levon
On Tue, Oct 05, 2021 at 07:36:21PM +0200, Thomas Monjalon wrote: > 21/09/2021 10:16, dkozl...@oss.nvidia.com: > > From: Dmitry Kozlyuk > > > > get_hugepage_dir() searched for a hugetlbfs mount with a given page size > > using handcraft parsing of /proc/mounts and mixing traversal logic with > >

Re: [dpdk-dev] [PATCH v5 1/3] eal/linux: make hugetlbfs analysis reusable

2021-09-22 Thread John Levon
eparate code to enumerate hugetlbfs mounts > to eal_hugepage_mount_walk() taking a callback that can inspect already > parsed entries. Use mntent(3) API for parsing. This allows to reuse > enumeration logic in subsequent patches. > > Signed-off-by: Dmitry Kozlyuk > Reviewed-by: Viaches

Re: [dpdk-dev] [PATCH v3 1/3] eal/linux: make hugetlbfs analysis reusable

2021-09-16 Thread John Levon
On Tue, Sep 14, 2021 at 01:34:54PM +0300, Dmitry Kozlyuk wrote: > + do { > + m = getmntent(f); Should you be using getmntent_r() etc? Nice cleanup! regards john

Re: [dpdk-dev] [PATCH v3 1/3] eal/linux: make hugetlbfs analysis reusable

2021-09-14 Thread John Levon
On Tue, Sep 14, 2021 at 01:34:54PM +0300, Dmitry Kozlyuk wrote: > get_hugepage_dir() searched for a hugetlbfs mount with a given page size > using handcraft parsing of /proc/mounts and mixing traversal logic with > selecting the needed entry. Separate code to enumerate hugetlbfs mounts > to eal_hu

Re: [dpdk-dev] [PATCH] eal: allow hugetlbfs sub-directories

2021-08-17 Thread John Levon
On Mon, Aug 09, 2021 at 12:24:34PM +0100, John Levon wrote: > get_hugepage_dir() was implemented in such a way that a --huge-dir > option had to exactly match the mountpoint, but there's no reason for > this restriction: DPDK might not be the only user of hugepages, and > shouldn

[dpdk-dev] [PATCH] eal: allow hugetlbfs sub-directories

2021-08-09 Thread John Levon
ages/myapp, and /dev/hugepages/dpdk, I should be able to specify: --huge-dir=/dev/hugepages/dpdk/ and have DPDK only use that sub-directory. Fix the implementation to allow a sub-directory within a suitable hugetlbfs mountpoint to be specified, preferring the closest match. Signed-off-by: John Lev

[dpdk-dev] [PATCH] app/test: quieten noise while forking

2021-08-01 Thread John Levon
When closing file descriptors post-fork, ignore "." and ".." directory entries, so the test log doesn't have distracting errors like: Error converting name fd 0 .: Error converting name fd 0 ..: Signed-off-by: John Levon --- app/test/process.h | 5 + 1 file chang

Re: [dpdk-dev] [PATCH] app/test: flush stdout after forking

2021-07-26 Thread John Levon
On Mon, Jul 26, 2021 at 01:27:48PM +0100, Bruce Richardson wrote: > On Mon, Jul 26, 2021 at 01:16:27PM +0100, John Levon wrote: > > meson test was not capturing the intended output from the child > > process; force a flush to ensure it reaches the test log. > > > >

[dpdk-dev] [PATCH] app/test: quieten noise while forking

2021-07-26 Thread John Levon
When closing file descriptors post-fork, ignore "." and ".." directory entries. Signed-off-by: John Levon --- app/test/process.h | 5 + 1 file changed, 5 insertions(+) diff --git a/app/test/process.h b/app/test/process.h index 0ed91a939e..5b10cf64df 100644 --- a/app/

[dpdk-dev] [PATCH] app/test: flush stdout after forking

2021-07-26 Thread John Levon
meson test was not capturing the intended output from the child process; force a flush to ensure it reaches the test log. Signed-off-by: John Levon --- app/test/process.h | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test/process.h b/app/test/process.h index a09a088477..0ed91a939e

Re: [dpdk-dev] [PATCH v3] eal: allow hugetlbfs sub-directories

2021-07-22 Thread John Levon
On Thu, Jul 22, 2021 at 10:29:45PM +0200, David Marchand wrote: > On Thu, Jul 8, 2021 at 1:00 PM John Levon wrote: > > > > get_hugepage_dir() was implemented in such a way that a --huge-dir > > option had to exactly match the mountpoint, but there's no reason for >

[dpdk-dev] [PATCH v3] eal: allow hugetlbfs sub-directories

2021-07-08 Thread John Levon
igned-off-by: John Levon --- v2: prefer closer matches v3: checkpatch fixes lib/eal/linux/eal_hugepage_info.c | 74 --- 1 file changed, 49 insertions(+), 25 deletions(-) diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c index d977

[dpdk-dev] [PATCH] eal: allow hugetlbfs sub-directories

2021-07-08 Thread John Levon
igned-off-by: John Levon --- lib/eal/linux/eal_hugepage_info.c | 74 +-- 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c index d97792cad..b5f08e94d 100644 --- a/lib/eal/

[dpdk-dev] [PATCH] eal: allow hugetlbfs sub-directories

2021-07-08 Thread John Levon
v2: fix to prefer closest match

Re: [dpdk-dev] [PATCH RESEND] eal: allow hugetlbfs sub-directories

2021-07-07 Thread John Levon
sub-directory within a > > suitable hugetlbfs mountpoint to be specified. > > > > Signed-off-by: John Levon > > --- > > lib/eal/linux/eal_hugepage_info.c | 25 +++-- > > 1 file changed, 19 insertions(+), 6 deletions(-) > > > &

[dpdk-dev] [PATCH RESEND] eal: allow hugetlbfs sub-directories

2021-06-25 Thread John Levon
get_hugepage_dir() was implemented in such a way that a --huge-dir option had to exactly match the mountpoint, but there's no reason for this restriction. Fix the implementation to allow a sub-directory within a suitable hugetlbfs mountpoint to be specified. Signed-off-by: John Levon ---

[dpdk-dev] [PATCH] eal: allow hugetlbfs sub-directories

2021-06-10 Thread John Levon
get_hugepage_dir() was implemented in such a way that a --huge-dir option had to exactly match the mountpoint, but there's no reason for this restriction. Fix the implementation to allow a sub-directory within a suitable hugetlbfs mountpoint to be specified. Signed-off-by: John Levon ---