From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BB6CA04A3 for ; Tue, 16 Jun 2020 15:33:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27B351BF76; Tue, 16 Jun 2020 15:33:16 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 436C71BF76 for ; Tue, 16 Jun 2020 15:33:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592314394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0ExDPsJeQNyLDfd6NgmHW6+jrNXUNcLyT7IOglGzG0=; b=V0Hc6u8YUlaZu1udgikZitKcHelRykBqM1+lEgS2jgrt2xTWdW2GwKlqswImffuLxwGT1n mMgJAR6wGCB5Sr/CepUHe+sEhF6lCsLfUbZFLxh7/UFhszbVDC3DQvpXQS/3Btwq8WWeV1 wZaSu/SonGunOsSJRXePm26b4enTJRk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-275-W_gaceeROci92cAEkN8yGg-1; Tue, 16 Jun 2020 09:33:09 -0400 X-MC-Unique: W_gaceeROci92cAEkN8yGg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5174CE917; Tue, 16 Jun 2020 13:33:08 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.205]) by smtp.corp.redhat.com (Postfix) with ESMTP id 694EE5D9D3; Tue, 16 Jun 2020 13:33:07 +0000 (UTC) From: Kevin Traynor To: Li Feng Cc: Anatoly Burakov , dpdk stable Date: Tue, 16 Jun 2020 14:33:01 +0100 Message-Id: <20200616133304.6812-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'mem: mark pages as not accessed when freeing memory' has been queued to LTS release 18.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Acked-by: Anatoly Burakov --- 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@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,