aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2014-12-10 18:43:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 20:41:06 -0500
commitd7be003a9d275299f5ee36bbdf156654f59e08e9 (patch)
treeb164b402af76a81eecd55cdddd1c23745fed9bef
parentc05543293e0bf586842844c14fd8c598f494a107 (diff)
cma: make default CMA area size zero for x86
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 <akinobu.mita@gmail.com> Reported-by: Peter Hurley <peter@hurleysoftware.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Chuck Ebbert <cebbert.lkml@gmail.com> Cc: Jean Delvare <jdelvare@suse.de> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Don Dutile <ddutile@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/base/Kconfig8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index df04227d00cf..98504ec99c7d 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -267,18 +267,24 @@ comment "Default contiguous memory area size:"
267config CMA_SIZE_MBYTES 267config CMA_SIZE_MBYTES
268 int "Size in Mega Bytes" 268 int "Size in Mega Bytes"
269 depends on !CMA_SIZE_SEL_PERCENTAGE 269 depends on !CMA_SIZE_SEL_PERCENTAGE
270 default 0 if X86
270 default 16 271 default 16
271 help 272 help
272 Defines the size (in MiB) of the default memory area for Contiguous 273 Defines the size (in MiB) of the default memory area for Contiguous
273 Memory Allocator. 274 Memory Allocator. If the size of 0 is selected, CMA is disabled by
275 default, but it can be enabled by passing cma=size[MG] to the kernel.
276
274 277
275config CMA_SIZE_PERCENTAGE 278config CMA_SIZE_PERCENTAGE
276 int "Percentage of total memory" 279 int "Percentage of total memory"
277 depends on !CMA_SIZE_SEL_MBYTES 280 depends on !CMA_SIZE_SEL_MBYTES
281 default 0 if X86
278 default 10 282 default 10
279 help 283 help
280 Defines the size of the default memory area for Contiguous Memory 284 Defines the size of the default memory area for Contiguous Memory
281 Allocator as a percentage of the total memory in the system. 285 Allocator as a percentage of the total memory in the system.
286 If 0 percent is selected, CMA is disabled by default, but it can be
287 enabled by passing cma=size[MG] to the kernel.
282 288
283choice 289choice
284 prompt "Selected region size" 290 prompt "Selected region size"