Discussion:
[PATCH] Bump CMA to 64M by default as found in 3.15 multi_v7_defconfig
Nicolas Chauvet
2014-06-04 21:32:42 UTC
Permalink
---
config-arm-generic | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config-arm-generic b/config-arm-generic
index c1bc653..27df69b 100644
--- a/config-arm-generic
+++ b/config-arm-generic
@@ -150,7 +150,7 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_CMA=y
CONFIG_DMA_CMA=y
# CONFIG_CMA_DEBUG is not set
-CONFIG_CMA_SIZE_MBYTES=16
+CONFIG_CMA_SIZE_MBYTES=64
CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
--
1.7.2.1
Peter Robinson
2014-06-05 08:42:20 UTC
Permalink
Why? You've provided no overview for this. What impact does it have on
platforms such as the BeagleBoneBlack? Nor have you even cc:ed the ARM
mailing list where this has impact.

Peter
Post by Nicolas Chauvet
---
config-arm-generic | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/config-arm-generic b/config-arm-generic
index c1bc653..27df69b 100644
--- a/config-arm-generic
+++ b/config-arm-generic
@@ -150,7 +150,7 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_CMA=y
CONFIG_DMA_CMA=y
# CONFIG_CMA_DEBUG is not set
-CONFIG_CMA_SIZE_MBYTES=16
+CONFIG_CMA_SIZE_MBYTES=64
CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
--
1.7.2.1
_______________________________________________
kernel mailing list
kernel at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel
Nicolas Chauvet
2014-08-04 18:56:23 UTC
Permalink
The commit d1c912c1001f was made into tegra_defconfig and later
forwared to multi_v7_deconfig as 0c86f089e66a93

Quoting original commit into the kernel tree:
- Allocate 64 MiB for CMA by default; the default 16MiB is not enough
for the majority of use-cases. This can still be overridden by the cma
command-line option.

If this patch is not applied, KMS drivers using CMA would
rapidly exhaust the allocated memory. This was seen on tegra_drm
(from tagr libdrm/opentegra with exa support on freedesktop.org)
...
kernel: host1x drm: failed to allocate buffer with size 2457600
...

On the other side, CMA allocated memory can easily be freed
http://lwn.net/Articles/486301/
"Freeing memory is much simpler process..."
Whereas they can only be allocated at boot time
https://lkml.org/lkml/2014/5/7/810
"CMA is introduced to provide physically contiguous pages at runtime.
For this purpose, it reserves memory at boot time."

This patch is about to have a convenient generic default
and to match upstream kernel default value.
Everything can be setup back into fedora tools such as arm-boot-config

At some point, tegra revisions that can support IOMMU will not
rely on CMA. This is not the case for tegra20

Tested on Toshiba AC100 (with 512M RAM with cma=128M zram=1x128M)
with opentegra DDX driver
---
config-arm-generic | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config-arm-generic b/config-arm-generic
index 0c5242c..158ea5c 100644
--- a/config-arm-generic
+++ b/config-arm-generic
@@ -162,7 +162,7 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_CMA=y
CONFIG_DMA_CMA=y
# CONFIG_CMA_DEBUG is not set
-CONFIG_CMA_SIZE_MBYTES=16
+CONFIG_CMA_SIZE_MBYTES=64
CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
--
1.7.2.1
Peter Robinson
2014-08-13 10:03:22 UTC
Permalink
NACK. See https://bugzilla.redhat.com/show_bug.cgi?id=1127000 for details.

Peter
Post by Nicolas Chauvet
The commit d1c912c1001f was made into tegra_defconfig and later
forwared to multi_v7_deconfig as 0c86f089e66a93
- Allocate 64 MiB for CMA by default; the default 16MiB is not enough
for the majority of use-cases. This can still be overridden by the cma
command-line option.
If this patch is not applied, KMS drivers using CMA would
rapidly exhaust the allocated memory. This was seen on tegra_drm
(from tagr libdrm/opentegra with exa support on freedesktop.org)
...
kernel: host1x drm: failed to allocate buffer with size 2457600
...
On the other side, CMA allocated memory can easily be freed
http://lwn.net/Articles/486301/
"Freeing memory is much simpler process..."
Whereas they can only be allocated at boot time
https://lkml.org/lkml/2014/5/7/810
"CMA is introduced to provide physically contiguous pages at runtime.
For this purpose, it reserves memory at boot time."
This patch is about to have a convenient generic default
and to match upstream kernel default value.
Everything can be setup back into fedora tools such as arm-boot-config
At some point, tegra revisions that can support IOMMU will not
rely on CMA. This is not the case for tegra20
Tested on Toshiba AC100 (with 512M RAM with cma=128M zram=1x128M)
with opentegra DDX driver
---
config-arm-generic | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/config-arm-generic b/config-arm-generic
index 0c5242c..158ea5c 100644
--- a/config-arm-generic
+++ b/config-arm-generic
@@ -162,7 +162,7 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_CMA=y
CONFIG_DMA_CMA=y
# CONFIG_CMA_DEBUG is not set
-CONFIG_CMA_SIZE_MBYTES=16
+CONFIG_CMA_SIZE_MBYTES=64
CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
--
1.7.2.1
_______________________________________________
arm mailing list
arm at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/arm
Loading...