From b9d8b9f8d25c8b554aaeee6960d40922af74643c Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Sun, 27 Mar 2022 17:10:12 +0800 Subject: [PATCH] ARM: configs: rv1106: Set MMC_QUEUE_DEPTH to 1 This patch Set MMC_QUEUE_DEPTH to 1 for products with sdcard on single core. Save slab memory: ~2.3MB +CONFIG_MMC_QUEUE_DEPTH=1 Analyze by kmem-probe: trace_analyze.py -k kernel/ -f kmem.log -b drivers/mmc/ -c kmem_account.txt Before: 64 depth default total waste net alloc/free caller -------------------------------------------- 2371584 0 2371584 579/0 mmc_mq_init_request+0x44L 4096 1576 4096 2/0 mmc_alloc_host+0x28L 2048 536 2048 1/0 mmc_alloc_card+0x30L 2048 944 2048 2/0 dw_mci_pltfm_register+0x30L 1536 144 1536 3/0 mmc_blk_alloc_req+0x88L 1024 312 1024 1/0 mmc_blk_probe+0x4ccL 256 80 256 2/0 mmc_gpio_alloc+0x28L 256 72 256 2/0 dw_mci_rk3288_parse_dt+0x30L 256 56 256 2/0 dw_mci_probe+0x40L 1024 0 0 2/2 mmc_get_ext_csd+0x54L After this patch: 1 depth on single core total waste net alloc/free caller --------------------------------------------- 49152 0 49152 12/0 mmc_mq_init_request+0x44L 4096 1576 4096 2/0 mmc_alloc_host+0x28L 2048 536 2048 1/0 mmc_alloc_card+0x30L 2048 944 2048 2/0 dw_mci_pltfm_register+0x30L 1536 144 1536 3/0 mmc_blk_alloc_req+0x88L 1024 312 1024 1/0 mmc_blk_probe+0x4ccL 256 80 256 2/0 mmc_gpio_alloc+0x28L 256 72 256 2/0 dw_mci_rk3288_parse_dt+0x30L 256 56 256 2/0 dw_mci_probe+0x40L 1024 0 0 2/2 mmc_get_ext_csd+0x54L Signed-off-by: Sugar Zhang Change-Id: I2b429d1b7188c8fdf2a6e229b2cd5941af85cd7c --- arch/arm/configs/rv1106-evb.config | 2 +- arch/arm/configs/rv1106-ipc.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/rv1106-evb.config b/arch/arm/configs/rv1106-evb.config index 569f040a5ccb..a7fad0b31fe4 100644 --- a/arch/arm/configs/rv1106-evb.config +++ b/arch/arm/configs/rv1106-evb.config @@ -524,7 +524,7 @@ CONFIG_MMC_DW_PLTFM=y CONFIG_MMC_DW_ROCKCHIP=y # CONFIG_MMC_HSQ is not set # CONFIG_MMC_MTK is not set -CONFIG_MMC_QUEUE_DEPTH=64 +CONFIG_MMC_QUEUE_DEPTH=1 # CONFIG_MMC_SDHCI is not set # CONFIG_MMC_SPI is not set # CONFIG_MMC_TEST is not set diff --git a/arch/arm/configs/rv1106-ipc.config b/arch/arm/configs/rv1106-ipc.config index b93b472a3aeb..cbbc223897f8 100644 --- a/arch/arm/configs/rv1106-ipc.config +++ b/arch/arm/configs/rv1106-ipc.config @@ -138,7 +138,7 @@ CONFIG_MMC_DW_PLTFM=y CONFIG_MMC_DW_ROCKCHIP=y # CONFIG_MMC_HSQ is not set # CONFIG_MMC_MTK is not set -CONFIG_MMC_QUEUE_DEPTH=64 +CONFIG_MMC_QUEUE_DEPTH=1 # CONFIG_MMC_SDHCI is not set # CONFIG_MMC_SPI is not set # CONFIG_MMC_TEST is not set