On Fri, Dec 05, 2014 at 09:57:41PM +0530, Hari Bathini wrote:
On 12/05/2014 08:41 PM, Vivek Goyal wrote:
On Tue, Nov 25, 2014 at 11:42:20AM +0530, 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.
Signed-off-by: Hari Bathini hbathini@linux.vnet.ibm.com
dracut-module-setup.sh | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..6ada7d3 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -612,6 +612,11 @@ install() { # Also redirect dracut-emergency to kdump error handler ln_r "$systemdsystemunitdir/emergency.service" "$systemdsystemunitdir/dracut-emergency.service"
- # 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 in kernel.
- sed -e "/^$/d" -e "/^#/d" -e "/min_free_kbytes/d" /etc/sysctl.conf > "${initdir}/etc/sysctl.conf"
Hari,
which service inside dracut applies forces these parameters? It does sound like a problem in kdump environment because lot of these settings might make sense in first kernel (when all cpus and memory is available) but might not make sense in second kernel.
It would be preferrable if we can override those settings based on user inputs instead of hardcoding these. Having said that I am not finding any way to do that.
So I guess for the time being we can take this patch. If more problems like this crop up, we might have to request dracut guys to provide us a command line option where sysctl options can be specified and user will need to provide those command line options.
So I guess for the time being we can take this patch. If more problems like this crop up, we might have to request dracut guys to provide us a command line option where sysctl options can be specified and user will need to provide those command line options.
w.r.t patch, what are expressions "-e "/^$/d"" and -e "/^#/d"?
Since we are here, thought of cleaning the sysctl.conf file in kdump initrd by deleting empty lines and comment lines respectively, as done for kdump.conf file
Ok, I don't think it was required but I am not particular about it. So..
Acked-by: Vivek Goyal vgoyal@redhat.com
Thanks Vivek