From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3AAED595C for ; Tue, 29 Sep 2015 04:37:56 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 28 Sep 2015 19:37:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,605,1437462000"; d="scan'208";a="799295202" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 28 Sep 2015 19:37:56 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 28 Sep 2015 19:37:55 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.75]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.210]) with mapi id 14.03.0248.002; Tue, 29 Sep 2015 10:37:45 +0800 From: "Xie, Huawei" To: "shesha Sreenivasamurthy (shesha)" Thread-Topic: [dpdk-dev] Unlinking hugepage backing file after initialiation Thread-Index: AdD6X9Ju/MtsxfWdQh2Z6wcUnply7Q== Date: Tue, 29 Sep 2015 02:37:45 +0000 Message-ID: References: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" , "ms >> Michael S. Tsirkin" 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 02:37:58 -0000 On 9/29/2015 8:04 AM, shesha Sreenivasamurthy (shesha) wrote:=0A= > Hello,=0A= > 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, when the applicati= on crashes or stopped, the memory is still consumed. Therefore, is there an= y reason not to unlink backing files after initialization ? If no, I will s= end a patch for the change.=0A= shesha:=0A= You remind me the virtio unexpected crashing issue. DPDK runs in user=0A= space. It is quite possible it dies unexpectedly, either crash or being=0A= killed.=0A= When the dpdk virtio app crashes, it doesn't have a chance to notify=0A= host, so host is still using its memory, backed by guest huge page.=0A= If huge page files are still reserved in hugetlbfs, we have a chance to=0A= recover virtio first, then unlink the huge pages.=0A= Otherwise if the huge pages are allocated by other process, its memory=0A= could be corrupted by host.=0A= =0A= Certainly it is not implemented like that for this purpose, but i think=0A= it is a temporary solution for this user space virtio driver issue.=0A= =0A= /huawei=0A= =0A= =0A= =0A= =0A= =0A= =0A= > --=0A= > - Thanks=0A= > char * (*shesha) (uint64_t cache, uint8_t F00D)=0A= > { return 0x0000C0DE; }=0A= >=0A= =0A=