From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B8B7A0C56; Mon, 23 Aug 2021 12:04:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 181E04014D; Mon, 23 Aug 2021 12:04:28 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id ADBF140042 for ; Mon, 23 Aug 2021 12:04:25 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10084"; a="204269506" X-IronPort-AV: E=Sophos;i="5.84,344,1620716400"; d="scan'208";a="204269506" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2021 03:04:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,344,1620716400"; d="scan'208";a="425702189" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP; 23 Aug 2021 03:04:24 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 23 Aug 2021 03:04:24 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 23 Aug 2021 03:04:24 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Mon, 23 Aug 2021 03:04:24 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Mon, 23 Aug 2021 03:04:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dN6RksdLU0JDyXJwR756qL0grg+0dFi/xz2kv70LH88NAZ1FWqribPiH22/4DzbmrGSa8ULbfKsQ3XYuv/D8ouoLfRLw1Km8GhvAEv1elyZN9DrL/CTsjmtfB1tf/YG5u3UVKwC6aRtWYaqITck8oGQXjOGl+tloJaiifvU1ETh+X65NWy1wdTws+x9KPMsYwl7iGhlLDouzEioyFuvkS/OK2xlfQyjYus0UsDKiWuP5POnamVbM1C1zZGZwYYx6fCuZIWh6rD+xYHyDPjuVWrBnq1mwVqlyeapKLaTGla4rvWoAT3dPRuJdz8p0q3KpIXd1nTJPTOa3qeCBzJHHUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9//AuIarE88FKQCHm3stQUeBDL/Rv7udpH3nsLDEeJc=; b=XU1tLXHvjwz8MNiFsYrDhnT4lQEVRUHFjuHoSmOHwrBtodxeqOeLrfbmjq0JKaOiS+axEOPokHepk1quGYF1aaVx+QIRGLg7QQ37VIN3hOi3+FuX9YHL8lsmpy4TOOwwh4RWskNqbw4aMIteynmzouhp1pS7o4St8rQf8WwP9Kp4BanI8Ptsuvxxlrk6nnJ+tphrUAJE/opS/BY8u5fyNhgvIjIJOgT3spplirqjhviGJjD2qB/Z1cIOKb0E031en+9WWMMRAPSOIqD9e5fB/NIsTpI2AfNyAgJKwZpCom/An6rBunQbW3iJ9n6+/SZEjx7VttLWxgqHIoLI603m6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9//AuIarE88FKQCHm3stQUeBDL/Rv7udpH3nsLDEeJc=; b=c1Zk2ltSbTA0m34kSTjqhNdK3SXjJ0uNa5rIjtHOc5GF2WH699WBcUjiHNhA931elnAx9RAWktRhvC1fKZOAf1/zCsKp7I+dvM1GlY8xmLs0c/WQRpIAG2VR+/gA1gGYjV8m1SMaT3bW7149xstd8/lbsjpG6tBU0mNj6J3xgNo= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4824.namprd11.prod.outlook.com (2603:10b6:510:38::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Mon, 23 Aug 2021 10:04:23 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::2979:70ca:38a:dbaf]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::2979:70ca:38a:dbaf%6]) with mapi id 15.20.4436.024; Mon, 23 Aug 2021 10:04:22 +0000 To: "Yan, Xiaoping (NSB - CN/Hangzhou)" , "dev@dpdk.org" References: CC: Reshma Pattan From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Mon, 23 Aug 2021 11:04:17 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB6PR07CA0052.eurprd07.prod.outlook.com (2603:10a6:6:2a::14) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.206] (37.228.236.146) by DB6PR07CA0052.eurprd07.prod.outlook.com (2603:10a6:6:2a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.6 via Frontend Transport; Mon, 23 Aug 2021 10:04:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 36a5474a-bef0-404f-5ce6-08d9661d618a X-MS-TrafficTypeDiagnostic: PH0PR11MB4824: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2se3ZFalhALstF2qA5IGq4UCy58/EffJyEKMe+twHf+4jBF8SaL1r6jLsxV6R891f7Nd0pPVbT2J/uTeUUdt/OIEAjlptx+v5Y/iYfFEqpaDlPIcWVwJ9OSN3KYxS49FXeJeBTu1FKpr1I79ocHeimcnvDyvgRrJn0CB+fWlg7PKwOfxhLsupGawHrgDJkbve/5TE11qNlluVujV3hNQyj/UD2biHe+PuwIFpL/lp9yTnVUzzYMch6j3wGXbANoQ94e1/5OjzCYQawItzPPazxXxWkDPamARhbSb+wCw3pckI9lyfyOsg+gMzCfOwHOC5e9fl9BqgDa0FKa3F6kO2rsEJOmP1xH/5hyYkH1FdBrlIoNxO//opl5oIJhQ0/aao6I0DzEGeHtpNIhKXKZd3QFD+t+vTmSDlt1ByCyVn5CeGTKFwL8m/jkeaWHRMLGFAKXMZGhQSjGfGWSC5Y0X1/mZT1h1XyWcXwpNDoYE7fDJZ4QR3MAn5UFySRIs1cqbKzo1V0Q4vsEHl0qBn6MvmspekpP6DOiLYv/Xirvz0rhMhUjC2QJd7aPH7DQWBhFm67fMPQ7UObQZAeGqhtLd4nfzslnN0L5PwZ9CV3c2QptTORSSOrFDJePDHaFqCKqK68XDjwtpUpzTlgf0+TJxhUe8IXp7XxeThNhgHHJpThf8YIuP3H+XZv6N1Hy02OPDfgEiEr8fUFoDunj7zobNPg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(136003)(39860400002)(376002)(366004)(316002)(2906002)(44832011)(38100700002)(16576012)(31686004)(110136005)(2616005)(956004)(8676002)(26005)(31696002)(6486002)(5660300002)(83380400001)(86362001)(107886003)(478600001)(8936002)(4326008)(186003)(36756003)(66946007)(53546011)(6666004)(66556008)(66476007)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a2dCUFdnYW13R3dRQlpubTBaekZkQndiU3dZbUpqeHJ3WDVuMXBrWDJSRDh3?= =?utf-8?B?VGVROHltMnpyMG40eWFuaXpFZVRCQ1VTbFNuTHgxVlMreEhvTVpwMXF3T2lz?= =?utf-8?B?Ny9zL0duQVlnZWplcmtJZzRZWEdoL1YvcGMxZzhwMTJMWEtiZWFrdHhZamhw?= =?utf-8?B?dXBydHhIblR0ZUVXZ1dhSFdhVDVPWVdub3FCME5Cb0hVbkoxMmVaK0dCQUpM?= =?utf-8?B?amg2MFYyQkpkVGk4STJPRkJzRC96eUVQRXhtYVBPcDJoZnAvd25VZjl1anN6?= =?utf-8?B?d09pTEhMa051UmduMXhKQkJZb1J2a3UySVIxZ2xiZ2VDc2dXZmxiclZZVWdJ?= =?utf-8?B?aFlIQUw0eFlKWFVrSFI0K0tlSmdrYmpvb3pBOExHeTJPZ0xRalhwU2VUbHRG?= =?utf-8?B?SVZiVVREUzQ0NjBnaGR3alltbzZ0L2w1RCtWZlJpODNJc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9qL3ZEbHdPcEppOFJzQzJY?= =?utf-8?B?QnBtdXI2eUZ0TXJ5S2RQczNtRXNsMWwxTFEwUHVId2tjSUFMVGhmTm5HSHd3?= =?utf-8?B?aGExTVNmR3VZZ3cxUEVQcExaQVprREt0VXowZ0pVSElDYnZ3QnRHd00xQnZF?= =?utf-8?B?Wlc4Y29xc002b21HdmRQeHJZMzJXbDZZTWpZOUpxbzB4SGlLSkFXclJTaU1L?= =?utf-8?B?VEhyekljdHN6MW5abVdhbDNxMWtOSWx2SzlQUXh6bEEwNDBXdnBCUEJCM3dJ?= =?utf-8?B?c3NqSE5HdkZkZEhuUmxQTWw2elhrb09JTmdXVjJrSk4rYjFmMDloNkdtYzZP?= =?utf-8?B?RmFMR3A5emhMRkllNG5FZlpobDFWenJra0ZMMWYzNHpkdlRqNVZIK292V29H?= =?utf-8?Q?z0749dDRveA8WQJNwrbQ+FwJg+R4q9eaTfRaced?= X-MS-Exchange-CrossTenant-Network-Message-Id: 36a5474a-bef0-404f-5ce6-08d9661d618a X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2021 10:04:22.8338 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IHdSs/nYX0SVwf7bhYIDLxtoqkW1JR+IvDx92sXt6Bz6Ry9SQVpAa0+cusTJ8hgtv/GXukPGAyAvFExOAYmNTQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4824 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] remove dpdk-pdump pcap file, disk space is not freed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 8/23/2021 5:14 AM, Yan, Xiaoping (NSB - CN/Hangzhou) wrote: > Hi, > > Before I run pdump, 21MB is used in /tmp > tmpfs 63G 21M 63G 1% /tmp > Then I run pdump with such command: > dpdk-pdump -c 0x4001000400100 -a 0000:03:00.6 -a 0000:03:06.1 --legacy-mem --base-virtaddr 0x2aaa2aa000 --file-prefix l2rt -- --pdump port=1,queue=*,rx-dev=/tmp/l2biprt.pcap,tx-dev=/tmp/l2biprt.pcap,mbuf-size=10240,total-num-mbufs=10000 > After stop, it generates a 14MB file > -rw-rw-r--. 1 9999 9999 14M Aug 23 03:58 l2biprt.pcap > And 35M is used in /tmp > tmpfs 63G 35M 63G 1% /tmp > And fuser show there are still several users of this file. (all these pids are of running dpdk primary and secondary processes ) > # fuser /tmp/l2biprt.pcap > /tmp/l2biprt.pcap: 139 342 347 434 > Then after I rm the file (l2biprt.pcap), disk space in tmp is not freed (still 35MB used) > rm l2biprt.pcap > df -h > tmpfs 63G 35M 63G 1% /tmp > > > It seems it goes like this: > pdump start->pdump send vdev hotplug add request->primary and secondary process calls pmd_pcap_probe() which opens the pcap file-> > pdump stop-> pdump send vdev hotplug remove request-> primary and secondary process does not close the pcap file > > To properly close the pcap file and release disk space, it seems we should: > > * somehow close the pcap file in "vdev hotplug remove", or > * don't open the pcap file in "vdev hotplug add"( pmd_pcap_probe()), it seems pcap eth_dev_start will open the pcap file in case it was not opened. > > Any comment is appreciated, thank you. Hi Yan, I can't reproduce the behavior you mentioned, for my case the .pcap file is closed when pdump is terminated and there is no active user of the file after that point. Removing the pcap device cause closing the .pcap files. When you terminate pdump application it will remove the pcap devices, and since it is a secondary process a message sent to primary to remove it too, making both process closing the pcap files. When I use testpmd as primary application, I am getting following log from testpmd when pdump terminated: "Port 2 is closed" Can you please test with testpmd? You can use '--log-level=*:debug' eal parameter to get more log for multi process communication. Btw, what is your DPDK version? I tested with latest DPDK (21.11.0-rc0).