Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbaJEGDe (ORCPT ); Sun, 5 Oct 2014 02:03:34 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:55939 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751261AbaJEGDd (ORCPT ); Sun, 5 Oct 2014 02:03:33 -0400 From: Akinobu Mita To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org Cc: Akinobu Mita , Peter Hurley , Chuck Ebbert , Marek Szyprowski , Konrad Rzeszutek Wilk , David Woodhouse , Don Dutile , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andi Kleen , Yinghai Lu , x86@kernel.org, iommu@lists.linux-foundation.org Subject: [PATCH] cma: make default CMA area size zero for x86 Date: Sun, 5 Oct 2014 15:02:56 +0900 Message-Id: <1412488976-3885-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This makes CMA memory area size zero for x86 in default configuration (doesn't change on the other architectures). If default CMA size is zero, DMA_CMA is disabled. It can be enabled by passing cma= to the kernel. This makes less impact on x86. Because there is no mainline driver that requires it for x86, and Peter Hurley reported the performance regression, as this is trying to drive _all_ dma mapping allocations through a _very_ small window. Signed-off-by: Akinobu Mita Reported-by: Peter Hurley Cc: Peter Hurley Cc: Chuck Ebbert Cc: Marek Szyprowski Cc: Konrad Rzeszutek Wilk Cc: David Woodhouse Cc: Don Dutile Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Andi Kleen Cc: Yinghai Lu Cc: x86@kernel.org Cc: iommu@lists.linux-foundation.org --- drivers/base/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 4e7f0ff..92a5987e 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -240,6 +240,7 @@ comment "Default contiguous memory area size:" config CMA_SIZE_MBYTES int "Size in Mega Bytes" depends on !CMA_SIZE_SEL_PERCENTAGE + default 0 if X86 default 16 help Defines the size (in MiB) of the default memory area for Contiguous @@ -248,6 +249,7 @@ config CMA_SIZE_MBYTES config CMA_SIZE_PERCENTAGE int "Percentage of total memory" depends on !CMA_SIZE_SEL_MBYTES + default 0 if X86 default 10 help Defines the size of the default memory area for Contiguous Memory -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/