From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-5.cisco.com (alln-iport-5.cisco.com [173.37.142.92]) by dpdk.org (Postfix) with ESMTP id 43A4C1DB1 for ; Tue, 29 Sep 2015 16:04:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7115; q=dns/txt; s=iport; t=1443535442; x=1444745042; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=NvrOF8tqcALol8Zuwh8F0VUtdzIefGLltWtN31T8nq4=; b=PwrnWt9e/YyH2nPrJkDJvqz1algctstMPmPuLkJ4VgXe/iSWXNXQeyyI 9RrGkqisRSqqcOFqGACBhSa2LYLUtXyuuYlLVW0fXzNoWplDI+U7YKo6W 5dLRgjMeNOP2jLMHU1/YXcKsT40qbdN7Yo00VdraSejI8L/bOlWCNFQTr U=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AJAgCrmQpW/4oNJK1egldNgT0GvVwBDYd0AoFMOBQBAQEBAQEBgQqEJAEBAQMBeQUHBAIBCBEDAQEBAScHMhQJCAIEDgWIJgjLXQEBAQEBAQEBAQEBAQEBAQEBAQEBAReLcIR8EQcGhCYFkkSDMAGNEptEHwEBQoQBcYgagQUBAQE X-IronPort-AV: E=Sophos;i="5.17,608,1437436800"; d="scan'208,217";a="192593597" Received: from alln-core-5.cisco.com ([173.36.13.138]) by alln-iport-5.cisco.com with ESMTP; 29 Sep 2015 14:04:01 +0000 Received: from XCH-RCD-020.cisco.com (xch-rcd-020.cisco.com [173.37.102.30]) by alln-core-5.cisco.com (8.14.5/8.14.5) with ESMTP id t8TE413d026778 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 29 Sep 2015 14:04:01 GMT Received: from xch-rcd-020.cisco.com (173.37.102.30) by XCH-RCD-020.cisco.com (173.37.102.30) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Tue, 29 Sep 2015 09:04:00 -0500 Received: from xhc-rcd-x06.cisco.com (173.37.183.80) by xch-rcd-020.cisco.com (173.37.102.30) with Microsoft SMTP Server (TLS) id 15.0.1104.5 via Frontend Transport; Tue, 29 Sep 2015 09:04:00 -0500 Received: from xmb-aln-x03.cisco.com ([169.254.6.63]) by xhc-rcd-x06.cisco.com ([173.37.183.80]) with mapi id 14.03.0248.002; Tue, 29 Sep 2015 09:04:00 -0500 From: "shesha Sreenivasamurthy (shesha)" To: Bruce Richardson , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] Unlinking hugepage backing file after initialiation Thread-Index: AQHQ+kpckJG1vBipX0G0rq8U7ayRsJ5TNnuggAB4xAD//7oDAA== Date: Tue, 29 Sep 2015 14:03:59 +0000 Message-ID: References: <2601191342CEEE43887BDE71AB97725836AA13EA@irsmsx105.ger.corp.intel.com> <20150929111428.GB6748@bricha3-MOBL3> In-Reply-To: <20150929111428.GB6748@bricha3-MOBL3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [173.37.102.15] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Unlinking hugepage backing file after initialiation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2015 14:04:02 -0000 What do you mean by secondary process attaching to primary process (Master-= slave setup ?) ? The first process crashed, how can we be sure that memory = is not half written ? -- - Thanks char * (*shesha) (uint64_t cache, uint8_t F00D) { return 0x0000C0DE; } From: Bruce Richardson > Organization: Intel Shannon Ltd. Date: Tuesday, September 29, 2015 at 4:14 AM To: "Ananyev, Konstantin" > Cc: Cisco Employee >, "dev@dpdk.o= rg" > Subject: Re: [dpdk-dev] Unlinking hugepage backing file after initialiation On Tue, Sep 29, 2015 at 09:03:15AM +0000, Ananyev, Konstantin wrote: > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of shesha Sreenivasamur= thy (shesha) > Sent: Tuesday, September 29, 2015 1:04 AM > To: dev@dpdk.org > Subject: [dpdk-dev] Unlinking hugepage backing file after initialiation > > Hello, > As of DPDK2.1, backing files are created in hugetablefs during mapping (i= n eal_memory.c::rte_eal_hugepage_init()) and these files are > not cleaned up (unlinked) after initialization (mmap-ing). This means, wh= en the application crashes or stopped, the memory is still > consumed. Therefore, is there any reason not to unlink backing files afte= r initialization For secondary process(es) to be able to open/map them too? Konstantin Exactly. The hugepages are kept present on the file system so that secondar= y processes can use them to attach to a primary process memory in a multi-pro= cess setup. What is done instead is that any old hugepage files are cleaned up when the application starts (or restarts). Regards, /Bruce >? If no, I will send a patch for the change. > > -- > - Thanks > char * (*shesha) (uint64_t cache, uint8_t F00D) > { return 0x0000C0DE; }