DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pawel Wodkowski <pawelx.wodkowski@intel.com>
To: dev@dpdk.org
Cc: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Subject: [dpdk-dev] [PATCH] eal: fix '--huge-unlink' option
Date: Fri, 21 Sep 2018 13:56:38 +0200	[thread overview]
Message-ID: <1537530998-109749-1-git-send-email-pawelx.wodkowski@intel.com> (raw)

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.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
To: Anatoly Burakov <anatoly.burakov@intel.com>

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 = 0; page < nrpages; page++) {
 		struct hugepage_file *hp = &hugepg_tbl[page];
 
-		if (hp->final_va != NULL && unlink(hp->filepath)) {
+		if (hp->orig_va != NULL && unlink(hp->filepath)) {
 			RTE_LOG(WARNING, EAL, "%s(): Removing %s failed: %s\n",
 				__func__, hp->filepath, strerror(errno));
 		}
-- 
2.7.4

             reply	other threads:[~2018-09-21  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 11:56 Pawel Wodkowski [this message]
2018-09-21  8:31 ` Stojaczyk, Dariusz
2018-09-26 18:12 ` Wodkowski, PawelX
2018-10-05  8:13 ` Burakov, Anatoly
2018-10-11  9:40   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537530998-109749-1-git-send-email-pawelx.wodkowski@intel.com \
    --to=pawelx.wodkowski@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).