From: Marek Szyprowski Subject: Re: [PATCH v2] cma: make default CMA area size zero for x86 Date: Mon, 06 Oct 2014 12:04:32 +0200 Message-ID: <54326930.1090805@samsung.com> References: <1412517260-3832-1-git-send-email-akinobu.mita@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <1412517260-3832-1-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Akinobu Mita , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org Cc: Chuck Ebbert , Andi Kleen , Peter Hurley , Yinghai Lu , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , David Woodhouse , Jean Delvare List-Id: iommu@lists.linux-foundation.org Hello, On 2014-10-05 15:54, Akinobu Mita wrote: > 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: Jean Delvare > 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-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org > Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Acked-by: Marek Szyprowski > --- > * v2 > - Add information in help text, suggested by Chuck Ebbert > > drivers/base/Kconfig | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig > index 4e7f0ff..115882f 100644 > --- a/drivers/base/Kconfig > +++ b/drivers/base/Kconfig > @@ -240,18 +240,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" Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland