On 5/16/20 7:53 AM, Gowrishankar Muthukrishnan wrote:
> After dpdk tests completes, cleaning up hugepage map files
> created by tests is helpful to release used memory into
> hugepage memory allocator.
> 
> Signed-off-by: Gowrishankar Muthukrishnan <[email protected]>
> ---
>  tests/system-dpdk-macros.at | 13 +++++++++++++
>  tests/system-dpdk.at        |  7 +++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
> index c6708ca..d3a3aea 100644
> --- a/tests/system-dpdk-macros.at
> +++ b/tests/system-dpdk-macros.at
> @@ -63,3 +63,16 @@ m4_define([OVS_DPDK_START],
>     AT_CAPTURE_FILE([ovs-vswitchd.log])
>     on_exit "kill_ovs_vswitchd `cat ovs-vswitchd.pid`"
>  ])
> +
> +
> +# OVS_DPDK_HUGEPAGE_CLEANUP([file])
> +#
> +# Cleanup system for stale hugepages.
> +#
> +m4_define([OVS_DPDK_HUGEPAGE_CLEANUP],
> +  [dnl Cleanup mapping files in hugetlbfs mount point
> +   AT_CHECK([cat /proc/mounts | grep hugetlbfs], [], [stdout])
> +   AT_CHECK([cut -d ' ' -f 2  stdout], [], [stdout])
> +   AT_CHECK([rm -f $(cat stdout)/$1], [], [])
> +
> +])

Can we just use --in-memory option and avoid having files at all?

General note about sending patches: Please, don't send new versions in reply
to the previous one.  This messes up mailboxes.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to