diff options
author | Akinobu Mita <[email protected]> | 2014-12-10 15:43:14 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-12-10 17:41:06 -0800 |
commit | d7be003a9d275299f5ee36bbdf156654f59e08e9 (patch) | |
tree | b164b402af76a81eecd55cdddd1c23745fed9bef | |
parent | c05543293e0bf586842844c14fd8c598f494a107 (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 <[email protected]>
Reported-by: Peter Hurley <[email protected]>
Cc: Peter Hurley <[email protected]>
Cc: Chuck Ebbert <[email protected]>
Cc: Jean Delvare <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Don Dutile <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Yinghai Lu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | drivers/base/Kconfig | 8 |
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:" 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 - Memory Allocator. + Memory Allocator. If the size of 0 is selected, CMA is disabled by + default, but it can be enabled by passing cma=size[MG] to the kernel. + 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 Allocator as a percentage of the total memory in the system. + If 0 percent is selected, CMA is disabled by default, but it can be + enabled by passing cma=size[MG] to the kernel. choice prompt "Selected region size" |