All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Akinobu Mita
	<akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org
Cc: Chuck Ebbert
	<cebbert.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>,
	Peter Hurley
	<peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>,
	Yinghai Lu <yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>
Subject: Re: [PATCH v2] cma: make default CMA area size zero for x86
Date: Mon, 06 Oct 2014 12:04:32 +0200	[thread overview]
Message-ID: <54326930.1090805@samsung.com> (raw)
In-Reply-To: <1412517260-3832-1-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 <akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Reported-by: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
> Cc: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
> Cc: Chuck Ebbert <cebbert.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>
> Cc: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> Cc: Don Dutile <ddutile-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
> Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
> Cc: Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>
> Cc: Yinghai Lu <yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
> Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org

Acked-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

> ---
> * 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

WARNING: multiple messages have this Message-ID (diff)
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Akinobu Mita <akinobu.mita@gmail.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: Peter Hurley <peter@hurleysoftware.com>,
	Chuck Ebbert <cebbert.lkml@gmail.com>,
	Jean Delvare <jdelvare@suse.de>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Don Dutile <ddutile@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Andi Kleen <andi@firstfloor.org>, Yinghai Lu <yinghai@kernel.org>,
	x86@kernel.org, iommu@lists.linux-foundation.org
Subject: Re: [PATCH v2] cma: make default CMA area size zero for x86
Date: Mon, 06 Oct 2014 12:04:32 +0200	[thread overview]
Message-ID: <54326930.1090805@samsung.com> (raw)
In-Reply-To: <1412517260-3832-1-git-send-email-akinobu.mita@gmail.com>

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 <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>
> Cc: 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>
> Cc: x86@kernel.org
> Cc: iommu@lists.linux-foundation.org

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
> * 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


  parent reply	other threads:[~2014-10-06 10:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-05 13:54 [PATCH v2] cma: make default CMA area size zero for x86 Akinobu Mita
2014-10-05 13:54 ` Akinobu Mita
     [not found] ` <1412517260-3832-1-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-06 10:04   ` Marek Szyprowski [this message]
2014-10-06 10:04     ` Marek Szyprowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54326930.1090805@samsung.com \
    --to=m.szyprowski-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org \
    --cc=cebbert.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jdelvare-l3A5Bk7waGM@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.