From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D052F1B101 for ; Wed, 26 Sep 2018 20:12:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 11:12:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,307,1534834800"; d="scan'208";a="266931797" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga006.fm.intel.com with ESMTP; 26 Sep 2018 11:12:03 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.67]) by irsmsx110.ger.corp.intel.com ([169.254.15.28]) with mapi id 14.03.0319.002; Wed, 26 Sep 2018 19:12:02 +0100 From: "Wodkowski, PawelX" To: "dev@dpdk.org" , "Burakov, Anatoly" Thread-Topic: [PATCH] eal: fix '--huge-unlink' option Thread-Index: AQHUUYNdp8yMxHTMo02ktA+CC8hRf6UC5VaQ Date: Wed, 26 Sep 2018 18:12:03 +0000 Message-ID: References: <1537530998-109749-1-git-send-email-pawelx.wodkowski@intel.com> In-Reply-To: <1537530998-109749-1-git-send-email-pawelx.wodkowski@intel.com> Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] eal: fix '--huge-unlink' option X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 18:12:06 -0000 Hi Anatoly, Can you take a look at this small fix. Thank you Pawe=B3 > -----Original Message----- > From: Wodkowski, PawelX > Sent: Friday, September 21, 2018 1:57 PM > To: dev@dpdk.org > Cc: Wodkowski, PawelX > Subject: [PATCH] eal: fix '--huge-unlink' option >=20 > The final_va field is set during remap_segment() but this information is > not propagated to temporal copy of huge page memory configuration so the > unlink_hugepage_files() function wrongly assume that there is nothing to > unlink. Fix this issue by checking orig_va instead of final_va. >=20 > Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") > To: Anatoly Burakov >=20 > Signed-off-by: Pawel Wodkowski > --- > lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c > b/lib/librte_eal/linuxapp/eal/eal_memory.c > index e3ac2481572d..b4a2b2b9e405 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_memory.c > +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c > @@ -585,7 +585,7 @@ unlink_hugepage_files(struct hugepage_file > *hugepg_tbl, > for (page =3D 0; page < nrpages; page++) { > struct hugepage_file *hp =3D &hugepg_tbl[page]; >=20 > - if (hp->final_va !=3D NULL && unlink(hp->filepath)) { > + if (hp->orig_va !=3D NULL && unlink(hp->filepath)) { > RTE_LOG(WARNING, EAL, "%s(): Removing %s failed: > %s\n", > __func__, hp->filepath, strerror(errno)); > } > -- > 2.7.4