[PATCH] UBUNTU: [Config] aws: disable CONFIG_DMA_CMA

Andrea Righi andrea.righi at canonical.com
Wed May 20 14:04:37 UTC 2020


BugLink: https://bugs.launchpad.net/bugs/1879711

This option seems to introduce failures when resuming from hibernation
on Xen t2 instance types, especially those with a small amount of memory
(e.g., t2.nano and t2.small).

With this option enabled device drivers are allowed to use the
Contiguous Memory Allocator (CMA) for DMA operations. So, drivers can
allocate large physically-contiguous blocks of memory, instead of
relying on the I/O map or scatter-gather support.

However, on resume, the memory used by DMA needs to be re-initialized /
re-allocated, but it may fail to allocate large chunks of contiguous
memory due to the fact that we also need to restore the hibernation
image, using more memory and causing a system hang during the resume
process.

Such failures are more likely to happen in systems with a small amount
of memory (e.g., t2.nano and t2.small) that were showing a significant
higher rate of failures.

Make sure to disable this option for now.

NOTE #1: this option has been disabled in the generic kernel because,
according to the associated bug link (LP: #1362261), it seemed to
introduce performance regressions on amd64, so there is no reason to do
differently in the aws kernel.

NOTE #2: this also disables the module 'etnaviv' (that is really not
needed in the aws kernel); update the modules list accordingly.

Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
---
 debian.aws/abi/5.4.0-1010.10/amd64/aws.modules |  1 -
 debian.aws/abi/5.4.0-1010.10/arm64/aws.modules |  1 -
 debian.aws/config/config.common.ubuntu         | 11 ++---------
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/debian.aws/abi/5.4.0-1010.10/amd64/aws.modules b/debian.aws/abi/5.4.0-1010.10/amd64/aws.modules
index 73b2f85502b0..edc8f2526f40 100644
--- a/debian.aws/abi/5.4.0-1010.10/amd64/aws.modules
+++ b/debian.aws/abi/5.4.0-1010.10/amd64/aws.modules
@@ -804,7 +804,6 @@ essiv
 et1011c
 et131x
 ethoc
-etnaviv
 eurotechwdt
 evbug
 exfat
diff --git a/debian.aws/abi/5.4.0-1010.10/arm64/aws.modules b/debian.aws/abi/5.4.0-1010.10/arm64/aws.modules
index c7f98d021117..0a7c23ca8848 100644
--- a/debian.aws/abi/5.4.0-1010.10/arm64/aws.modules
+++ b/debian.aws/abi/5.4.0-1010.10/arm64/aws.modules
@@ -1269,7 +1269,6 @@ et1011c
 et131x
 et8ek8
 ethoc
-etnaviv
 evbug
 exc3000
 exfat
diff --git a/debian.aws/config/config.common.ubuntu b/debian.aws/config/config.common.ubuntu
index 9016defc3cc8..b1186b256df9 100644
--- a/debian.aws/config/config.common.ubuntu
+++ b/debian.aws/config/config.common.ubuntu
@@ -1299,15 +1299,9 @@ CONFIG_CM3323=m
 CONFIG_CM3605=m
 CONFIG_CM36651=m
 CONFIG_CMA=y
-CONFIG_CMA_ALIGNMENT=8
 CONFIG_CMA_AREAS=7
 # CONFIG_CMA_DEBUG is not set
 # CONFIG_CMA_DEBUGFS is not set
-CONFIG_CMA_SIZE_MBYTES=16
-# CONFIG_CMA_SIZE_SEL_MAX is not set
-CONFIG_CMA_SIZE_SEL_MBYTES=y
-# CONFIG_CMA_SIZE_SEL_MIN is not set
-# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
 CONFIG_CMDLINE="console=ttyAMA0"
 # CONFIG_CMDLINE_BOOL is not set
 # CONFIG_CMDLINE_FORCE is not set
@@ -2001,7 +1995,7 @@ CONFIG_DMAR_TABLE=y
 CONFIG_DMA_ACPI=y
 # CONFIG_DMA_API_DEBUG is not set
 CONFIG_DMA_BCM2835=y
-CONFIG_DMA_CMA=y
+# CONFIG_DMA_CMA is not set
 CONFIG_DMA_DECLARE_COHERENT=y
 CONFIG_DMA_DIRECT_REMAP=y
 CONFIG_DMA_ENGINE=y
@@ -2091,8 +2085,7 @@ CONFIG_DRM_DP_CEC=y
 CONFIG_DRM_DUMB_VGA_DAC=m
 CONFIG_DRM_DW_HDMI=m
 CONFIG_DRM_DW_HDMI_CEC=m
-CONFIG_DRM_ETNAVIV=m
-CONFIG_DRM_ETNAVIV_THERMAL=y
+# CONFIG_DRM_ETNAVIV is not set
 CONFIG_DRM_FBDEV_EMULATION=y
 # CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set
 CONFIG_DRM_FBDEV_OVERALLOC=100
-- 
2.25.1




More information about the kernel-team mailing list