[dpdk-stable] patch 'mem: mark pages as not accessed when freeing memory' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Tue Jun 16 15:33:01 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b3e4d3e81a691271cecf503bef93425c56cd2962

Thanks.

Kevin.

---
>From b3e4d3e81a691271cecf503bef93425c56cd2962 Mon Sep 17 00:00:00 2001
From: Li Feng <fengli at smartx.com>
Date: Fri, 24 Apr 2020 18:42:05 +0800
Subject: [PATCH] mem: mark pages as not accessed when freeing memory

[ upstream commit 76e91e3f14fc13f31608167d698682790be45cba ]

Commit 8a4baf06c17a ("mem: mark pages as not accessed when reserving VA")
has mapped the initialized memory with PROT_NONE, and when it's unmapped,
eal_memalloc.c should remmap the anonymous memory with PROT_NONE too.

Fixes: 8a4baf06c17a ("mem: mark pages as not accessed when reserving VA")

Signed-off-by: Li Feng <fengli at smartx.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
index bff7dcd58e..518314d89c 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
@@ -807,5 +807,5 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
 	memset(ms->addr, 0, ms->len);
 
-	if (mmap(ms->addr, ms->len, PROT_READ,
+	if (mmap(ms->addr, ms->len, PROT_NONE,
 			MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0) ==
 				MAP_FAILED) {
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-16 14:31:15.958687275 +0100
+++ 0001-mem-mark-pages-as-not-accessed-when-freeing-memory.patch	2020-06-16 14:31:15.911226718 +0100
@@ -1 +1 @@
-From 76e91e3f14fc13f31608167d698682790be45cba Mon Sep 17 00:00:00 2001
+From b3e4d3e81a691271cecf503bef93425c56cd2962 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 76e91e3f14fc13f31608167d698682790be45cba ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -16 +17 @@
- lib/librte_eal/linux/eal_memalloc.c | 2 +-
+ lib/librte_eal/linuxapp/eal/eal_memalloc.c | 2 +-
@@ -19,5 +20,5 @@
-diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
-index af6d0d023a..678094acf9 100644
---- a/lib/librte_eal/linux/eal_memalloc.c
-+++ b/lib/librte_eal/linux/eal_memalloc.c
-@@ -681,5 +681,5 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
+diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+index bff7dcd58e..518314d89c 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
++++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+@@ -807,5 +807,5 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,



More information about the stable mailing list