Hi Rasmus,

On Fri Aug 22, 2025 at 11:48 PM IST, Rasmus Villemoes wrote:
> The first two patches make memtest run ~40x faster (when, as it should
> be, dcache is disabled), with the second patch being responsible for
> most of that. At least on the beagleboneblack which I used for
> testing; other boards and configurations will likely see different
> numbers.
>
> This is for CONFIG_SYS_ALT_MEMTEST=y and
> CONFIG_SYS_ALT_MEMTEST_BITFLIP=n; one could probably get a similar
> improvement in the bitflip case since that also has a schedule() call
> in the inner loop.
>
> Rasmus Villemoes (3):
>   memtest: don't volatile-qualify local variables
>   memtest: only call schedule() once for every 256 words
>   memtest: remove use of vu_long typedef in mem_test_alt
>
>  cmd/mem.c | 40 +++++++++++++++++++++-------------------
>  1 file changed, 21 insertions(+), 19 deletions(-)

For the entire series:
Tested-by: Anshul Dalal <ansh...@ti.com>

Tested on TI AM62P EVM, with ~10x improvment.

Patch:

        diff --git a/configs/am62px_evm_a53_defconfig 
b/configs/am62px_evm_a53_defconfig
        index fa857e51137..896e98fb7ca 100644
        --- a/configs/am62px_evm_a53_defconfig
        +++ b/configs/am62px_evm_a53_defconfig
        @@ -150,6 +150,9 @@ CONFIG_SPL_USB_HOST=y
         CONFIG_SPL_USB_STORAGE=y
         CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
         CONFIG_EFI_SET_TIME=y
        +CONFIG_CMD_MEMTEST=y
        +CONFIG_SYS_ALT_MEMTEST=y
        +CONFIG_SYS_ALT_MEMTEST_BITFLIP=n

         #include <configs/k3_efi_capsule.config>
         #include <configs/am62x_a53_usbdfu.config>

Results:

Before:
        => dcache off
        => time mtest 0x81000000 0x82000000 0 1
        Testing 81000000 ... 82000000:
        Iteration:      1
        Tested 1 iteration(s) with 0 errors.

        time: 10.848 seconds

After:
        => dcache off
        => time mtest 0x81000000 0x82000000 0 1
        Testing 81000000 ... 82000000:
        Iteration:      1
        Tested 1 iteration(s) with 0 errors.

        time: 1.054 seconds

Regards,
Anshul

Reply via email to