Skip to content

Commit 6b3ffb4

Browse files
Andrea Righiianmay81
Andrea Righi
authored andcommitted
UBUNTU: [Config] aws: disable CONFIG_DMA_CMA
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 <[email protected]> Acked-by: Stefan Bader <[email protected]> Acked-by: Kleber Souza <[email protected]> Signed-off-by: Khalid Elmously <[email protected]>
1 parent bf98a5f commit 6b3ffb4

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

debian.aws/abi/5.4.0-1015.15/amd64/aws.modules

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,6 @@ essiv
804804
et1011c
805805
et131x
806806
ethoc
807-
etnaviv
808807
eurotechwdt
809808
evbug
810809
exfat

debian.aws/config/amd64/config.common.amd64

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ CONFIG_ATA_PIIX=y
6363
# CONFIG_CHARGER_SMB347 is not set
6464
# CONFIG_COMEDI is not set
6565
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
66+
# CONFIG_DMA_CMA is not set
6667
CONFIG_DMA_VIRTUAL_CHANNELS=m
68+
# CONFIG_DRM_ETNAVIV is not set
6769
# CONFIG_DRM_NOUVEAU is not set
6870
# CONFIG_FIREWIRE is not set
6971
# CONFIG_FPGA is not set

debian.aws/config/annotations

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,11 +1489,12 @@ CONFIG_DEVTMPFS note<ENFORCED> note<upstart requ
14891489
CONFIG_DEVTMPFS_MOUNT note<ENFORCED> note<upstart requirement>
14901490

14911491
# Menu: Device Drivers >> Generic Driver Options >> DMA Contiguous Memory Allocator
1492-
CONFIG_DMA_CMA policy<{'amd64': 'n', 'arm64': 'n', 'armhf-generic': 'y', 'armhf-generic-lpae': 'n', 'i386': 'n', 's390x': 'n'}>
1493-
CONFIG_CMA_SIZE_MBYTES policy<{'armhf-generic': '16'}>
1494-
CONFIG_CMA_ALIGNMENT policy<{'armhf-generic': '8'}>
1492+
CONFIG_DMA_CMA policy<{'amd64': 'n', 'arm64': 'y', 'armhf': 'y', 'i386': 'n', 's390x': 'n'}>
1493+
CONFIG_CMA_SIZE_MBYTES policy<{'arm64': '32', 'armhf': '32', }>
1494+
CONFIG_CMA_ALIGNMENT policy<{'arm64': '8', 'armhf': '8', }>
14951495
#
1496-
CONFIG_DMA_CMA note<LP#1362261>
1496+
CONFIG_DMA_CMA mark<ENFORCED> note<LP#1362261> note<LP:1803206>
1497+
CONFIG_CMA_SIZE_MBYTES mark<ENFORCED> note<LP:1823753>
14971498

14981499
# Menu: Device Drivers >> Generic Driver Options >> DMA Contiguous Memory Allocator >> Selected region size
14991500
CONFIG_CMA_SIZE_SEL_MBYTES policy<{'armhf-generic': 'y'}>
@@ -1751,8 +1752,8 @@ CONFIG_DRM_STM_DSI policy<{'armhf': 'm'}>
17511752
CONFIG_DRM_STI policy<{'armhf': 'n'}>
17521753
CONFIG_DRM_VC4 policy<{'arm64': 'm'}>
17531754
CONFIG_DRM_VC4_HDMI_CEC policy<{'arm64': 'y'}>
1754-
CONFIG_DRM_ETNAVIV policy<{'armhf-generic': 'm'}>
1755-
CONFIG_DRM_ETNAVIV_REGISTER_LOGGING policy<{'armhf-generic': 'n'}>
1755+
CONFIG_DRM_ETNAVIV policy<{'amd64': 'n', 'arm64': 'm', 'armhf': 'm', 'i386': 'n', 'ppc64el': 'n', 's390x': 'n'}>
1756+
CONFIG_DRM_ETNAVIV_THERMAL policy<{'arm64': 'y', 'armhf': 'y'}>
17561757
CONFIG_DRM_ARCPGU policy<{'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm'}>
17571758
CONFIG_DRM_HISI_HIBMC policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'i386': 'm', 'ppc64el': 'm'}>
17581759
CONFIG_DRM_HISI_KIRIN policy<{'arm64': 'm'}>

debian.aws/config/arm64/config.common.arm64

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ CONFIG_CHARGER_SBS=m
6363
CONFIG_CHARGER_SMB347=m
6464
CONFIG_COMEDI=m
6565
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
66+
CONFIG_DMA_CMA=y
6667
CONFIG_DMA_VIRTUAL_CHANNELS=y
68+
CONFIG_DRM_ETNAVIV=m
6769
CONFIG_DRM_NOUVEAU=m
6870
CONFIG_FIREWIRE=m
6971
CONFIG_FPGA=m

debian.aws/config/config.common.ubuntu

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ CONFIG_CMA_ALIGNMENT=8
13031303
CONFIG_CMA_AREAS=7
13041304
# CONFIG_CMA_DEBUG is not set
13051305
# CONFIG_CMA_DEBUGFS is not set
1306-
CONFIG_CMA_SIZE_MBYTES=16
1306+
CONFIG_CMA_SIZE_MBYTES=32
13071307
# CONFIG_CMA_SIZE_SEL_MAX is not set
13081308
CONFIG_CMA_SIZE_SEL_MBYTES=y
13091309
# CONFIG_CMA_SIZE_SEL_MIN is not set
@@ -2001,7 +2001,6 @@ CONFIG_DMAR_TABLE=y
20012001
CONFIG_DMA_ACPI=y
20022002
# CONFIG_DMA_API_DEBUG is not set
20032003
CONFIG_DMA_BCM2835=y
2004-
CONFIG_DMA_CMA=y
20052004
CONFIG_DMA_DECLARE_COHERENT=y
20062005
CONFIG_DMA_DIRECT_REMAP=y
20072006
CONFIG_DMA_ENGINE=y
@@ -2091,7 +2090,6 @@ CONFIG_DRM_DP_CEC=y
20912090
CONFIG_DRM_DUMB_VGA_DAC=m
20922091
CONFIG_DRM_DW_HDMI=m
20932092
CONFIG_DRM_DW_HDMI_CEC=m
2094-
CONFIG_DRM_ETNAVIV=m
20952093
CONFIG_DRM_ETNAVIV_THERMAL=y
20962094
CONFIG_DRM_FBDEV_EMULATION=y
20972095
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set

0 commit comments

Comments
 (0)