On 12/08/14 at 11:34am, Hari Bathini wrote:
On 12/08/2014 11:22 AM, Dave Young wrote:
>Hi, Hari
>
>Thanks for the update, but sorry that I find some other issue.
>
>On 12/08/14 at 10:57am, Hari Bathini wrote:
>>When the value of vm.min_free_kbytes is set too high in /etc/sysctl.conf,
>>kdump kernel fails with OOM. As min_free_kbytes may not be relevant for
>>kdump kernel, this patch tries to fix the issue by removing it from the
>>file sysctl.conf and thus forcing default value for vm.min_free_kbytes
>>parameter.
>>
>>Changes from v1 to v2:
>>1. Moved snippet modifying /etc/sysctl.conf file to a new function
>>2. Removed unnecessary expressions while modifying sysctl.conf
>>
>>Signed-off-by: Hari Bathini <hbathini(a)linux.vnet.ibm.com>
>>---
>> dracut-module-setup.sh | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>>diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
>>index dcebc47..72871d0 100755
>>--- a/dracut-module-setup.sh
>>+++ b/dracut-module-setup.sh
>>@@ -378,6 +378,16 @@ kdump_install_conf() {
>> rm -f /tmp/$$-kdump.conf
>> }
>>+# Certain things configured in /etc/sysctl.conf are not relevant
>>+# for kdump kernel. Tune them here
>>+kdump_sysctl_conf() {
>>+
>>+ # While min_free_kbytes may not be relevant for kdump kernel,
>>+ # it leads to OOM in cases where this value is too high.
>>+ # Let's be paranoid and force it to default value calculated by kernel.
>>+ sed -e "/min_free_kbytes/d" /etc/sysctl.conf >
"${initdir}/etc/sysctl.conf"
>Checking dracut code, they install sysctl config files via modules.d/98systemd/:
>There's below files:
> /etc/sysctl.d/*.conf \
> /etc/sysctl.conf
>
>Thus, if we only checking sysctl.conf, we will miss sysctl.d/*.conf.
Dave, as /etc/sysctl.d/99-sysctl.conf is a softlink to ../sysctl.conf,
I think that shouldn't be a problem?
If there's a /etc/sysctl.d/vm.conf which contains the min_free_kbytes, we can not
catch it..
Thanks
Hari
>>+}
>>+
>> kdump_iscsi_get_rec_val() {
>> local result
>>@@ -586,6 +596,7 @@ kdump_install_random_seed() {
>> install() {
>> kdump_install_conf
>>+ kdump_sysctl_conf
>> if is_ssh_dump_target; then
>> kdump_install_random_seed
>>
>>_______________________________________________
>>kexec mailing list
>>kexec(a)lists.fedoraproject.org
>>https://lists.fedoraproject.org/mailman/listinfo/kexec
>>
>>
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec