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>
This commit is contained in:
parent
c05543293e
commit
d7be003a9d
1 changed files with 7 additions and 1 deletions
|
@ -267,18 +267,24 @@ comment "Default contiguous memory area size:"
|
||||||
config CMA_SIZE_MBYTES
|
config CMA_SIZE_MBYTES
|
||||||
int "Size in Mega Bytes"
|
int "Size in Mega Bytes"
|
||||||
depends on !CMA_SIZE_SEL_PERCENTAGE
|
depends on !CMA_SIZE_SEL_PERCENTAGE
|
||||||
|
default 0 if X86
|
||||||
default 16
|
default 16
|
||||||
help
|
help
|
||||||
Defines the size (in MiB) of the default memory area for Contiguous
|
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
|
config CMA_SIZE_PERCENTAGE
|
||||||
int "Percentage of total memory"
|
int "Percentage of total memory"
|
||||||
depends on !CMA_SIZE_SEL_MBYTES
|
depends on !CMA_SIZE_SEL_MBYTES
|
||||||
|
default 0 if X86
|
||||||
default 10
|
default 10
|
||||||
help
|
help
|
||||||
Defines the size of the default memory area for Contiguous Memory
|
Defines the size of the default memory area for Contiguous Memory
|
||||||
Allocator as a percentage of the total memory in the system.
|
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
|
choice
|
||||||
prompt "Selected region size"
|
prompt "Selected region size"
|
||||||
|
|
Loading…
Reference in a new issue