From patchwork Thu May 14 11:48:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 1290189 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DtJNvq7H; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49N8x92m34z9sTL for ; Thu, 14 May 2020 21:50:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BE9D5267F7; Thu, 14 May 2020 11:50:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f6yF-TutMWFC; Thu, 14 May 2020 11:50:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 04E332045B; Thu, 14 May 2020 11:50:18 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id DB9A9C0863; Thu, 14 May 2020 11:50:17 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4F60EC016F for ; Thu, 14 May 2020 11:50:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3F1D58971A for ; Thu, 14 May 2020 11:50:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NExDxbaLPMOS for ; Thu, 14 May 2020 11:50:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by hemlock.osuosl.org (Postfix) with ESMTPS id 96E0F89715 for ; Thu, 14 May 2020 11:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589457014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+jX/1AF+w4tkMmS/+4bKMNKXQB/+uyFHqKhMGjkv8DY=; b=DtJNvq7Him4sWSGs6nTv9cq/ZULWb6qI7kXEpGt/PKtBrUD9aBtU6kLxHtkst2bZUmdfUG SzgSI/cZvFNV9nR1R0klc1mZch27uRnFUmF5YXNGv4aE1GyIIgcq9IlcHlqJbFrph9RY8V UzUtfiD1ElMlbOr6JUbxu3q/YI27CJc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-177-j-c49jDnMnWlDakeZLqXQw-1; Thu, 14 May 2020 07:48:10 -0400 X-MC-Unique: j-c49jDnMnWlDakeZLqXQw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BC655835B47; Thu, 14 May 2020 11:48:09 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.sin2.redhat.com [10.67.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 377281001920; Thu, 14 May 2020 11:48:07 +0000 (UTC) From: Gowrishankar Muthukrishnan To: dev@openvswitch.org Date: Thu, 14 May 2020 17:18:01 +0530 Message-Id: <6940cca52e1932f6a4cac1569d9d067783e303a4.1589456076.git.gmuthukr@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Flavio Leitner Subject: [ovs-dev] [PATCH 1/3] system-dpdk: cleanup stale hugepage files after tests X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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 --- 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..b3a46d1 100644 --- a/tests/system-dpdk-macros.at +++ b/tests/system-dpdk-macros.at @@ -1,3 +1,16 @@ +# 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], [], []) + +]) + + # OVS_DPDK_PRE_CHECK() # # Check prerequisites for DPDK tests. Following settings are checked: diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index a015d52..01ac970 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -16,6 +16,7 @@ OVS_VSWITCHD_STOP(["/Global register is changed during/d /EAL: Invalid NUMA socket, default to 0/d /EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d /EAL: No free hugepages reported in hugepages-1048576kB/d"]) +OVS_DPDK_HUGEPAGE_CLEANUP([rtemap_*]) AT_CLEANUP dnl -------------------------------------------------------------------------- @@ -43,6 +44,7 @@ OVS_VSWITCHD_STOP("/does not exist. The Open vSwitch kernel module is probably n /EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d /EAL: No free hugepages reported in hugepages-1048576kB/d ") +OVS_DPDK_HUGEPAGE_CLEANUP([rtemap_*]) AT_CLEANUP dnl -------------------------------------------------------------------------- @@ -75,6 +77,7 @@ OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably \@EAL: Invalid NUMA socket, default to 0@d \@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d \@EAL: No free hugepages reported in hugepages-1048576kB@d"]) +OVS_DPDK_HUGEPAGE_CLEANUP([rtemap_*]) AT_CLEANUP dnl -------------------------------------------------------------------------- @@ -154,6 +157,8 @@ OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably \@EAL: Invalid NUMA socket, default to 0@d \@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d \@EAL: No free hugepages reported in hugepages-1048576kB@d"]) +OVS_DPDK_HUGEPAGE_CLEANUP([rtemap_*]) +OVS_DPDK_HUGEPAGE_CLEANUP([page0map_0]) AT_CLEANUP dnl -------------------------------------------------------------------------- @@ -230,5 +235,7 @@ OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably \@EAL: Invalid NUMA socket, default to 0@d \@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d \@EAL: No free hugepages reported in hugepages-1048576kB@d"]) +OVS_DPDK_HUGEPAGE_CLEANUP([rtemap_*]) +OVS_DPDK_HUGEPAGE_CLEANUP([page0map_0]) AT_CLEANUP dnl --------------------------------------------------------------------------