Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1466506 > unrolled thread

[PATCH 2/4] arm64: defconfig: Set cma heap size to 128MB

Started byGuodong Xu <guodong.xu@linaro.org>
First post2016-08-19 17:50 +0200
Last post2016-08-24 04:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/4] arm64: defconfig: Set cma heap size to 128MB Guodong Xu <guodong.xu@linaro.org> - 2016-08-19 17:50 +0200
    Re: [PATCH 2/4] arm64: defconfig: Set cma heap size to 128MB Thierry Reding <treding@nvidia.com> - 2016-08-22 11:10 +0200
      Re: [PATCH 2/4] arm64: defconfig: Set cma heap size to 128MB Guodong Xu <guodong.xu@linaro.org> - 2016-08-24 04:30 +0200

#1466506 — [PATCH 2/4] arm64: defconfig: Set cma heap size to 128MB

FromGuodong Xu <guodong.xu@linaro.org>
Date2016-08-19 17:50 +0200
Subject[PATCH 2/4] arm64: defconfig: Set cma heap size to 128MB
Message-ID<s7Uds-7rO-25@gated-at.bofh.it>
From: Xinliang Liu <xinliang.liu@linaro.org>

For debian linux, cma heap is used to allocate graphic buffers.
The default size is 16 MB which is not enought.
So increase the size to 128 MB.

Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index e27f086..c94f2fa 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -130,6 +130,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DMA_CMA=y
+CONFIG_CMA_SIZE_MBYTES=128
 CONFIG_MTD=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_SPI_NOR=y
-- 
1.9.1

[toc] | [next] | [standalone]


#1467488

FromThierry Reding <treding@nvidia.com>
Date2016-08-22 11:10 +0200
Message-ID<s8ToZ-4l2-13@gated-at.bofh.it>
In reply to#1466506

[Multipart message — attachments visible in raw view] — view raw

On Fri, Aug 19, 2016 at 11:42:06PM +0800, Guodong Xu wrote:
> From: Xinliang Liu <xinliang.liu@linaro.org>
> 
> For debian linux, cma heap is used to allocate graphic buffers.
> The default size is 16 MB which is not enought.
> So increase the size to 128 MB.
> 
> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
> ---
>  arch/arm64/configs/defconfig | 1 +
>  1 file changed, 1 insertion(+)

This is a bad idea. You're increasing this heap for all users of the
default configuration (which on 64-bit ARM is everyone, really). Many of
the devices don't require the CMA except maybe for the occasional very
small buffer. Most implement some form of IOMMU support that removes the
need for large amounts of contiguous physical memory.

I think it's a better idea to have some bootloader append a cma=128 to
the kernel command-line if necessary.

Thierry

[toc] | [prev] | [next] | [standalone]


#1469031

FromGuodong Xu <guodong.xu@linaro.org>
Date2016-08-24 04:30 +0200
Message-ID<s9w6Z-4hQ-5@gated-at.bofh.it>
In reply to#1467488
On 22 August 2016 at 17:06, Thierry Reding <treding@nvidia.com> wrote:
> On Fri, Aug 19, 2016 at 11:42:06PM +0800, Guodong Xu wrote:
>> From: Xinliang Liu <xinliang.liu@linaro.org>
>>
>> For debian linux, cma heap is used to allocate graphic buffers.
>> The default size is 16 MB which is not enought.
>> So increase the size to 128 MB.
>>
>> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
>> ---
>>  arch/arm64/configs/defconfig | 1 +
>>  1 file changed, 1 insertion(+)
>
> This is a bad idea. You're increasing this heap for all users of the
> default configuration (which on 64-bit ARM is everyone, really). Many of
> the devices don't require the CMA except maybe for the occasional very
> small buffer. Most implement some form of IOMMU support that removes the
> need for large amounts of contiguous physical memory.
>
> I think it's a better idea to have some bootloader append a cma=128 to
> the kernel command-line if necessary.
>

I will remove this. Thanks.

-Guodong Xu

> Thierry

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web