[PATCH 1/1][F][aws] UBUNTU: [Config] aws: disable CONFIG_DMA_CMA
Andrea Righi
andrea.righi at canonical.com
Fri May 22 13:34:32 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 on amd64 and re-align the
config and annotations file with the master kernel.
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/config/amd64/config.common.amd64 | 2 ++
debian.aws/config/annotations | 13 +++++++------
debian.aws/config/arm64/config.common.arm64 | 2 ++
debian.aws/config/config.common.ubuntu | 4 +---
5 files changed, 12 insertions(+), 10 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/config/amd64/config.common.amd64 b/debian.aws/config/amd64/config.common.amd64
index 90b08cb3bf45..9826e7744674 100644
--- a/debian.aws/config/amd64/config.common.amd64
+++ b/debian.aws/config/amd64/config.common.amd64
@@ -63,7 +63,9 @@ CONFIG_ATA_PIIX=y
# CONFIG_CHARGER_SMB347 is not set
# CONFIG_COMEDI is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
+# CONFIG_DMA_CMA is not set
CONFIG_DMA_VIRTUAL_CHANNELS=m
+# CONFIG_DRM_ETNAVIV is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_FIREWIRE is not set
# CONFIG_FPGA is not set
diff --git a/debian.aws/config/annotations b/debian.aws/config/annotations
index 3f1a668eeeda..3c9399c2a32b 100644
--- a/debian.aws/config/annotations
+++ b/debian.aws/config/annotations
@@ -1489,11 +1489,12 @@ CONFIG_DEVTMPFS note<ENFORCED> note<upstart requ
CONFIG_DEVTMPFS_MOUNT note<ENFORCED> note<upstart requirement>
# Menu: Device Drivers >> Generic Driver Options >> DMA Contiguous Memory Allocator
-CONFIG_DMA_CMA policy<{'amd64': 'n', 'arm64': 'n', 'armhf-generic': 'y', 'armhf-generic-lpae': 'n', 'i386': 'n', 's390x': 'n'}>
-CONFIG_CMA_SIZE_MBYTES policy<{'armhf-generic': '16'}>
-CONFIG_CMA_ALIGNMENT policy<{'armhf-generic': '8'}>
+CONFIG_DMA_CMA policy<{'amd64': 'n', 'arm64': 'y', 'armhf': 'y', 'i386': 'n', 's390x': 'n'}>
+CONFIG_CMA_SIZE_MBYTES policy<{'arm64': '32', 'armhf': '32', }>
+CONFIG_CMA_ALIGNMENT policy<{'arm64': '8', 'armhf': '8', }>
#
-CONFIG_DMA_CMA note<LP#1362261>
+CONFIG_DMA_CMA mark<ENFORCED> note<LP#1362261> note<LP:1803206>
+CONFIG_CMA_SIZE_MBYTES mark<ENFORCED> note<LP:1823753>
# Menu: Device Drivers >> Generic Driver Options >> DMA Contiguous Memory Allocator >> Selected region size
CONFIG_CMA_SIZE_SEL_MBYTES policy<{'armhf-generic': 'y'}>
@@ -1751,8 +1752,8 @@ CONFIG_DRM_STM_DSI policy<{'armhf': 'm'}>
CONFIG_DRM_STI policy<{'armhf': 'n'}>
CONFIG_DRM_VC4 policy<{'arm64': 'm'}>
CONFIG_DRM_VC4_HDMI_CEC policy<{'arm64': 'y'}>
-CONFIG_DRM_ETNAVIV policy<{'armhf-generic': 'm'}>
-CONFIG_DRM_ETNAVIV_REGISTER_LOGGING policy<{'armhf-generic': 'n'}>
+CONFIG_DRM_ETNAVIV policy<{'amd64': 'n', 'arm64': 'm', 'armhf': 'm', 'i386': 'n', 'ppc64el': 'n', 's390x': 'n'}>
+CONFIG_DRM_ETNAVIV_THERMAL policy<{'arm64': 'y', 'armhf': 'y'}>
CONFIG_DRM_ARCPGU policy<{'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm'}>
CONFIG_DRM_HISI_HIBMC policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'i386': 'm', 'ppc64el': 'm'}>
CONFIG_DRM_HISI_KIRIN policy<{'arm64': 'm'}>
diff --git a/debian.aws/config/arm64/config.common.arm64 b/debian.aws/config/arm64/config.common.arm64
index f9e4def0ac44..8b4928bf1784 100644
--- a/debian.aws/config/arm64/config.common.arm64
+++ b/debian.aws/config/arm64/config.common.arm64
@@ -63,7 +63,9 @@ CONFIG_CHARGER_SBS=m
CONFIG_CHARGER_SMB347=m
CONFIG_COMEDI=m
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
+CONFIG_DMA_CMA=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DRM_ETNAVIV=m
CONFIG_DRM_NOUVEAU=m
CONFIG_FIREWIRE=m
CONFIG_FPGA=m
diff --git a/debian.aws/config/config.common.ubuntu b/debian.aws/config/config.common.ubuntu
index 9016defc3cc8..5bef26ecdfb0 100644
--- a/debian.aws/config/config.common.ubuntu
+++ b/debian.aws/config/config.common.ubuntu
@@ -1303,7 +1303,7 @@ 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_MBYTES=32
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_MIN is not set
@@ -2001,7 +2001,6 @@ 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_DECLARE_COHERENT=y
CONFIG_DMA_DIRECT_REMAP=y
CONFIG_DMA_ENGINE=y
@@ -2091,7 +2090,6 @@ 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_FBDEV_EMULATION=y
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set
--
2.25.1
More information about the kernel-team
mailing list