From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335AbbFLIwJ (ORCPT ); Fri, 12 Jun 2015 04:52:09 -0400 Received: from terminus.zytor.com ([198.137.202.10]:34069 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753140AbbFLIwA (ORCPT ); Fri, 12 Jun 2015 04:52:00 -0400 Date: Fri, 12 Jun 2015 01:50:35 -0700 From: tip-bot for Joerg Roedel Message-ID: Cc: peterz@infradead.org, akpm@linux-foundation.org, dvlasenk@redhat.com, hpa@zytor.com, bhe@redhat.com, linux-kernel@vger.kernel.org, mingo@kernel.org, luto@amacapital.net, vgoyal@redhat.com, joro@8bytes.org, dyoung@redhat.com, tglx@linutronix.de, jroedel@suse.de, torvalds@linux-foundation.org, bp@alien8.de, brgerst@gmail.com, bp@suse.de Reply-To: bp@suse.de, brgerst@gmail.com, bp@alien8.de, torvalds@linux-foundation.org, tglx@linutronix.de, jroedel@suse.de, dyoung@redhat.com, joro@8bytes.org, vgoyal@redhat.com, luto@amacapital.net, mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, bhe@redhat.com, hpa@zytor.com, akpm@linux-foundation.org, dvlasenk@redhat.com In-Reply-To: <1433500202-25531-4-git-send-email-joro@8bytes.org> References: <1433500202-25531-4-git-send-email-joro@8bytes.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/kdump] x86/crash: Allocate enough low memory when crashkernel=high Git-Commit-ID: 94fb9334182284e8e7e4bcb9125c25dc33af19d4 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 94fb9334182284e8e7e4bcb9125c25dc33af19d4 Gitweb: http://git.kernel.org/tip/94fb9334182284e8e7e4bcb9125c25dc33af19d4 Author: Joerg Roedel AuthorDate: Wed, 10 Jun 2015 17:49:42 +0200 Committer: Ingo Molnar CommitDate: Thu, 11 Jun 2015 08:28:39 +0200 x86/crash: Allocate enough low memory when crashkernel=high When the crash kernel is loaded above 4GiB in memory, the first kernel allocates only 72MiB of low-memory for the DMA requirements of the second kernel. On systems with many devices this is not enough and causes device driver initialization errors and failed crash dumps. Testing by SUSE and Redhat has shown that 256MiB is a good default value for now and the discussion has lead to this value as well. So set this default value to 256MiB to make sure there is enough memory available for DMA. Signed-off-by: Joerg Roedel [ Reflow comment. ] Signed-off-by: Borislav Petkov Acked-by: Baoquan He Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Young Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vivek Goyal Cc: kexec@lists.infradead.org Link: http://lkml.kernel.org/r/1433500202-25531-4-git-send-email-joro@8bytes.org Signed-off-by: Ingo Molnar --- arch/x86/kernel/setup.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d74ac33..cba8288 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -531,12 +531,14 @@ static void __init reserve_crashkernel_low(void) if (ret != 0) { /* * two parts from lib/swiotlb.c: - * swiotlb size: user specified with swiotlb= or default. - * swiotlb overflow buffer: now is hardcoded to 32k. - * We round it to 8M for other buffers that - * may need to stay low too. + * -swiotlb size: user-specified with swiotlb= or default. + * + * -swiotlb overflow buffer: now hardcoded to 32k. We round it + * to 8M for other buffers that may need to stay low too. Also + * make sure we allocate enough extra low memory so that we + * don't run out of DMA buffers for 32-bit devices. */ - low_size = swiotlb_size_or_default() + (8UL<<20); + low_size = max(swiotlb_size_or_default() + (8UL<<20), 256UL<<20); auto_set = true; } else { /* passed with crashkernel=0,low ? */