On 12/08/14 at 01:24pm, Hari Bathini wrote:
On 12/08/2014 11:49 AM, WANG Chao wrote:
>On 12/08/14 at 01:52pm, 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.
Hmmm...
That makes it a little tricky.
>I checked in RHEL6 era we didn't include sysctl.conf in 2nd kernel. I
>think we can do the same here. dracut will first install sysctl.conf in
>98systemd module and we can remove it in our 99kdump module. Thoughts?
I think the best way to go forward is as suggested by Chao..
To remove sysctl in kdump dracut module..
Ok, please send a new patch for this.
I think we can do something like below for future fix:
1) add kernel cmdline params like: sysctl.x.y=z [x=vm,net,etc.] [y=min_free_kbytes, etc.]
2) add kernel cmdline, nosysctl so that only the params which are passed in kernel cmdline
are used.
3) remove the sysctl.conf deletion in kdump module, suggest user to add nosysctl in
cmdline
Thanks
Hari
>Thanks
>WANG Chao
>
>>>+}
>>>+
>>> 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
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec