!50 在24.03版本关闭pin memory

From: @renoseven 
Reviewed-by: @snoweay 
Signed-off-by: @snoweay
This commit is contained in:
openeuler-ci-bot 2024-05-15 07:53:41 +00:00 committed by Gitee
commit e17c6e0504
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 42 additions and 41 deletions

View File

@ -0,0 +1,38 @@
From ef3b67cdd08819699eb43bb06c4f63b34eba477a Mon Sep 17 00:00:00 2001
From: renoseven <dev@renoseven.net>
Date: Wed, 15 May 2024 15:34:35 +0800
Subject: [PATCH] ignore pin memory init in oe24.03
Signed-off-by: renoseven <dev@renoseven.net>
---
misc/nvwa-pre.sh | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/misc/nvwa-pre.sh b/misc/nvwa-pre.sh
index 69f6de9..61535bc 100644
--- a/misc/nvwa-pre.sh
+++ b/misc/nvwa-pre.sh
@@ -1,7 +1,5 @@
#!/bin/bash
-set -e
-
# 1. Increase last pid by 2011 from saved last pid.
# So services restoring may use its old pid.
LAST_PID_FILE="/proc/sys/kernel/ns_last_pid"
@@ -31,11 +29,7 @@ else
rm -rf "${LAST_PID_SAVE_FILE}"
fi
-# 2. Enable Pin Memory
-modprobe pin_memory
-/usr/bin/nvwa-pin --init-pagemap-read
-
-# 3. Enable PMEM
+# 2. Enable PMEM
grep -q "Persistent Memory" /proc/iomem || exit 0
modprobe nd_e820
--
2.34.1

View File

@ -1,39 +0,0 @@
From fe0b709d2fe196097796b3b964803226c6ca9578 Mon Sep 17 00:00:00 2001
From: hejingxian <hejingxian@huawei.com>
Date: Thu, 1 Dec 2022 23:02:21 +0800
Subject: [PATCH] ignore pin memory init in x86
Signed-off-by: hejingxian <hejingxian@huawei.com>
---
misc/nvwa-pre.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/misc/nvwa-pre.sh b/misc/nvwa-pre.sh
index 69f6de9..18960e7 100644
--- a/misc/nvwa-pre.sh
+++ b/misc/nvwa-pre.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-set -e
+#set -e
# 1. Increase last pid by 2011 from saved last pid.
# So services restoring may use its old pid.
@@ -32,8 +32,11 @@ else
fi
# 2. Enable Pin Memory
-modprobe pin_memory
-/usr/bin/nvwa-pin --init-pagemap-read
+is_x86=`uname -a | grep x86`
+if [[ $is_x86"X" == "X" ]]; then
+ modprobe pin_memory
+ /usr/bin/nvwa-pin --init-pagemap-read
+fi
# 3. Enable PMEM
grep -q "Persistent Memory" /proc/iomem || exit 0
--
2.20.1.windows.1

View File

@ -1,6 +1,6 @@
Name: nvwa
Version: 0.2
Release: 5
Release: 6
Summary: a tool used for openEuler kernel update
License: MulanPSL-2.0 and Apache-2.0 and MIT and MPL-2.0
@ -9,7 +9,7 @@ Source: %{name}-v%{version}.tar.gz
#source1 version sys@v0.0.0-20220908164124-27713097b956
Source1: sys.tar.gz
Patch1: 0001-ignore-pin-memory-init-in-x86.patch
Patch1: 0001-ignore-pin-memory-init-in-oe24.03.patch
Patch2: 0002-systemd-solve-the-problem-of-parsing-pid-of-message.patch
Patch3: 0003-nvwa-let-nvwa-to-parse-help-h-and-remove-version-pri.patch
@ -89,6 +89,8 @@ source /usr/share/bash-completion/completions/nvwa
%{_bindir}/%{name}-pre.sh
%changelog
* Wed May 15 2024 renoseven <dev@renoseven.net> - 0.2-6
- disable pin memory in oe24.03
* Thu Jul 13 2023 huajingyun <huajingyun@loongson.cn> - 0.2-5
- add loong64 support
* Tue Jan 03 2023 anatasluo <luolongjun@huawei.com> - 0.2-4