This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: Performance difference between SDK 7.1 and SDK 8.1

Part Number: TDA4VM

Hello,

I migrated my application from SDK 7.1 to SDK 8.1.

I saw a 9% CPU utilization drop. So I checked the individual threads' consumptions. They used less and cumulatively 9% drop.

It looks like overall impact by for example compiler option rather than optimizing a specific module.

Is there a clue to investigate the reason for improvement?

Thank you very much.

  • Hello,

    Can you please provide more specifics? Is this RTOS SDK or Linux SDK? Which CPU are you referring to? A72 or some other core? Did you mean CPU utilization drop or performance drop? What does your application do?

    Regards

    Hemant

  • Hello Hemant,

    Thank you for your reply.

    I ran both SDKs, RTOS and Linux. I am referring to A72 and CPU utilization drop. I am using a multicam application based on vision_apps.

    Best regards,

  • I ran both SDKs, RTOS and Linux. I am referring to A72 and CPU utilization drop. I am using a multicam application based on vision_apps.

    So 8.1 is better w.r.t A72 CPU utilization. Am i understanding it correct?

    - Keerthy

  • Hello Keerthy,

    Yes, so I wanted to know a reason.

    Thank you very much.

  • Hi,

    This is a delta that is causing the performance drop on the 8.0+ SDKs.

    From 64b1d9dfb38f3a87ed5233aa7792479bde46c2e6 Mon Sep 17 00:00:00 2001
    From: Matt Ranostay <matt.ranostay@konsulko.com>
    Date: Fri, 27 May 2022 20:28:23 +0300
    Subject: [DO NOT MERGE] common: spl: proof of concept on debugging timing
     issues on A72 SPL
    
    Cache + MMU was moved in U-Boot SPL so the delay on memset/memcpy
    isn't likely a real issue. With this patchset applied it has the
    same timings as 07.03.00.005 tag
    
    U-Boot SPL 2021.01-00001-g22d58417aa (May 27 2022 - 20:42:56 +0300)
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.9.1--v2021.09a (Terrific Lla')
    Reading on-board EEPROM at 0x50 failed 1
    ti_i2c_eeprom_am6_parse_record: Ignoring record id 17
    memcpy 20MB takes -> msec: 8
    memset 20MB takes -> msec: 5
    Trying to boot from MMC2
    
    Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
    ---
     common/spl/spl.c | 30 ++++++++++++++++++++++++++++++
     1 file changed, 30 insertions(+)
    
    diff --git a/common/spl/spl.c b/common/spl/spl.c
    index 63c48fbf33..a233177359 100644
    --- a/common/spl/spl.c
    +++ b/common/spl/spl.c
    @@ -32,6 +32,8 @@
     #include <bootcount.h>
     #include <wdt.h>
     
    +#include <time.h>
    +
     DECLARE_GLOBAL_DATA_PTR;
     
     #ifndef CONFIG_SYS_UBOOT_START
    @@ -548,6 +550,26 @@ static int boot_from_devices(struct spl_image_info *spl_image,
     {
     	int i;
     
    +	/* BENCHMARK */
    +	{
    +		char * from;
    +		char * to;
    +		unsigned int size;
    +		u32 done;
    +
    +		size = 20 * 1024 * 1024;
    +		to = 0x82000000;
    +		from = to + size;
    +
    +		done = get_timer(0);
    +		memcpy( to, from, size);
    +		printf("memcpy 20MB takes -> msec: %u\n", get_timer(done));
    +
    +		done = get_timer(0);
    +		memset( to, 0, size);
    +		printf("memset 20MB takes -> msec: %u\n", get_timer(done));
    +	}
    +
     	for (i = 0; i < count && spl_boot_list[i] != BOOT_DEVICE_NONE; i++) {
     		struct spl_image_loader *loader;
     
    @@ -602,6 +624,14 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
     
     	spl_set_bd();
     
    +#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) && \
    +	(defined(CONFIG_CPU_V7A) || defined(CONFIG_ARM64) ||	\
    +	 defined(CONFIG_CPU_V7R))
    +	dram_init_banksize();
    +	arch_reserve_mmu();
    +	enable_caches();
    +#endif
    +
     #if defined(CONFIG_SYS_SPL_MALLOC_START)
     	mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
     			CONFIG_SYS_SPL_MALLOC_SIZE);
    -- 
    2.30.2
    

    Try this and let us know if you are getting the same performance as 7.3 SDK.

    Best Regards,
    Keerthy