From 4c358ce791a03d2dbc1dec48dab68930a2b561cc Mon Sep 17 00:00:00 2001 From: panchenbo Date: Tue, 18 Jun 2024 15:22:33 +0800 Subject: [PATCH] add loongarch64 sw_64 riscv64 to THP patch --- containerd.spec | 10 ++++- ...le-Transparent-HugePage-for-shim-pro.patch | 38 ++++++++++++++----- patch/3001-thp-add-support-sw_64.patch | 22 +++++++++++ series.conf | 1 + 4 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 patch/3001-thp-add-support-sw_64.patch diff --git a/containerd.spec b/containerd.spec index 9084257..f2b85c8 100644 --- a/containerd.spec +++ b/containerd.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} Version: 1.2.0 Name: containerd -Release: 319 +Release: 320 Summary: An industry-standard container runtime License: ASL 2.0 URL: https://containerd.io @@ -72,6 +72,12 @@ install -p -m 755 bin/ctr $RPM_BUILD_ROOT/%{_bindir}/ctr %{_bindir}/ctr %changelog +* Tue Jun 18 2024 panchenbo - 1.2.0-320 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:add loongarch64 sw_64 riscv64 to THP patch + * Mon Mar 4 2024 Lu Jingxiao - 1.2.0-319 - Type:bugfix - ID:NA @@ -135,7 +141,7 @@ install -p -m 755 bin/ctr $RPM_BUILD_ROOT/%{_bindir}/ctr - SUG:NA - DESC:fix CVE-2023-25153 and CVE-2023-25173 -* Thu Dec 16 2022 zhongjiawei - 1.2.0-308 +* Fri Dec 16 2022 zhongjiawei - 1.2.0-308 - Type:bugfix - ID:NA - SUG:NA diff --git a/patch/0111-containerd-disable-Transparent-HugePage-for-shim-pro.patch b/patch/0111-containerd-disable-Transparent-HugePage-for-shim-pro.patch index be5a841..4600acb 100644 --- a/patch/0111-containerd-disable-Transparent-HugePage-for-shim-pro.patch +++ b/patch/0111-containerd-disable-Transparent-HugePage-for-shim-pro.patch @@ -1,21 +1,23 @@ -From 746264387fe1f3d0daa17d05ee7a1751f526dde8 Mon Sep 17 00:00:00 2001 -From: Song Zhang -Date: Thu, 21 Dec 2023 18:57:19 +0800 -Subject: [PATCH] containerd: disable Transparent HugePage for shim process if - SHIM_DISABLE_THP is set +From 173152fa76a4df25e4d04f53c2a4291ebcd735dd Mon Sep 17 00:00:00 2001 +From: panchenbo +Date: Tue, 18 Jun 2024 14:35:00 +0800 +Subject: [PATCH] ddd -Signed-off-by: Song Zhang --- runtime/v1/shim/client/client.go | 13 +++++++ runtime/v1/shim/reaper.go | 13 +++++++ sys/thp.go | 34 +++++++++++++++++++ sys/thp_amd64.go | 3 ++ sys/thp_arm64.go | 3 ++ + sys/thp_loong64.go | 3 ++ + sys/thp_riscv64.go | 3 ++ .../github.com/containerd/go-runc/monitor.go | 20 +++++++++-- - 6 files changed, 83 insertions(+), 3 deletions(-) + 8 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 sys/thp.go create mode 100644 sys/thp_amd64.go create mode 100644 sys/thp_arm64.go + create mode 100644 sys/thp_loong64.go + create mode 100644 sys/thp_riscv64.go diff --git a/runtime/v1/shim/client/client.go b/runtime/v1/shim/client/client.go index 4c134c2..29a89e7 100644 @@ -73,7 +75,7 @@ index f5f8096..03759a6 100644 return ec, nil diff --git a/sys/thp.go b/sys/thp.go new file mode 100644 -index 0000000..3bbbd00 +index 0000000..25c97a6 --- /dev/null +++ b/sys/thp.go @@ -0,0 +1,34 @@ @@ -129,6 +131,24 @@ index 0000000..a6db8d6 +package sys + +const PRCTL_SYSCALL = 167 +diff --git a/sys/thp_loong64.go b/sys/thp_loong64.go +new file mode 100644 +index 0000000..a6db8d6 +--- /dev/null ++++ b/sys/thp_loong64.go +@@ -0,0 +1,3 @@ ++package sys ++ ++const PRCTL_SYSCALL = 167 +diff --git a/sys/thp_riscv64.go b/sys/thp_riscv64.go +new file mode 100644 +index 0000000..a6db8d6 +--- /dev/null ++++ b/sys/thp_riscv64.go +@@ -0,0 +1,3 @@ ++package sys ++ ++const PRCTL_SYSCALL = 167 diff --git a/vendor/github.com/containerd/go-runc/monitor.go b/vendor/github.com/containerd/go-runc/monitor.go index bb8bbab..a9ac837 100644 --- a/vendor/github.com/containerd/go-runc/monitor.go @@ -174,5 +194,5 @@ index bb8bbab..a9ac837 100644 } ec := make(chan Exit, 1) -- -2.33.0 +2.27.0 diff --git a/patch/3001-thp-add-support-sw_64.patch b/patch/3001-thp-add-support-sw_64.patch new file mode 100644 index 0000000..0770aaf --- /dev/null +++ b/patch/3001-thp-add-support-sw_64.patch @@ -0,0 +1,22 @@ +From 6afcd6f23798ea8ef5d9eac7898cf83c2b710300 Mon Sep 17 00:00:00 2001 +From: panchenbo +Date: Tue, 18 Jun 2024 15:05:15 +0800 +Subject: [PATCH] thp add support sw_64 + +--- + sys/thp_sw64.go | 3 +++ + 1 file changed, 3 insertions(+) + create mode 100644 sys/thp_sw64.go + +diff --git a/sys/thp_sw64.go b/sys/thp_sw64.go +new file mode 100644 +index 0000000..a6db8d6 +--- /dev/null ++++ b/sys/thp_sw64.go +@@ -0,0 +1,3 @@ ++package sys ++ ++const PRCTL_SYSCALL = 167 +-- +2.27.0 + diff --git a/series.conf b/series.conf index fe1d267..81777d8 100644 --- a/series.conf +++ b/series.conf @@ -120,4 +120,5 @@ patch/0109-containerd-Backport-net-http-regenerate-h2_bundle.go.patch patch/0110-containerd-update-vendored-golang.org-x-net.patch patch/0111-containerd-disable-Transparent-HugePage-for-shim-pro.patch patch/0112-containerd-cio-FIFOSet.Close-check-if-FIFOSet-is-nill-to-preven.patch +sw64_patch/3001-thp-add-support-sw_64.patch # end -- Gitee