9 Star 0 Fork 8

src-openEuler/kdump-anaconda-addon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
enable-kdump-and-set-default-reserve-memory-512M.patch 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
From 09ab1debcc752ed7d9dbff5731450f9a0df7761a Mon Sep 17 00:00:00 2001
From: zhangqiumiao <zhangqiumiao1@huawei.com>
Date: Wed, 23 Sep 2020 11:23:11 +0800
Subject: [PATCH] enable kdump and set default reserve memory 512M
---
com_redhat_kdump/common.py | 2 +-
com_redhat_kdump/service/kdump.py | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/com_redhat_kdump/common.py b/com_redhat_kdump/common.py
index b8450c8..992d63e 100644
--- a/com_redhat_kdump/common.py
+++ b/com_redhat_kdump/common.py
@@ -71,7 +71,7 @@ def getMemoryBounds():
minUsable = 1024
step = 1
elif arch == 'aarch64':
- lowerBound = 768
+ lowerBound = 512
minUsable = 768
step = 1
else:
diff --git a/com_redhat_kdump/service/kdump.py b/com_redhat_kdump/service/kdump.py
index ff902b7..2764e6a 100644
--- a/com_redhat_kdump/service/kdump.py
+++ b/com_redhat_kdump/service/kdump.py
@@ -47,8 +47,13 @@ class KdumpService(KickstartService):
self._fadump_enabled = False
self.fadump_enabled_changed = Signal()
- self.reserveMB = "auto"
lower, upper, step = getMemoryBounds()
+ # set default reserveMB
+ # ensure that 512M is not out of MemoryBounds
+ if (upper > 512):
+ self._reserved_memory = "512"
+ else:
+ self._reserved_memory = "%d" % lower
self.reserved_memory_changed = Signal()
def publish(self):
--
2.19.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/kdump-anaconda-addon.git
git@gitee.com:src-openeuler/kdump-anaconda-addon.git
src-openeuler
kdump-anaconda-addon
kdump-anaconda-addon
master

搜索帮助