U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anshul Dalal <anshuld@ti.com>
To: Rasmus Villemoes <ravi@prevas.dk>, <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 0/3] memtest performance improvements
Date: Thu, 28 Aug 2025 19:18:53 +0530	[thread overview]
Message-ID: <DCE3WWVDTYNE.R7JSUVWETMLO@ti.com> (raw)
In-Reply-To: <20250822181848.3325832-1-ravi@prevas.dk>

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 <anshuld@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

  parent reply	other threads:[~2025-08-28 13:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 18:18 [PATCH 0/3] memtest performance improvements Rasmus Villemoes
2025-08-22 18:18 ` [PATCH 1/3] memtest: don't volatile-qualify local variables Rasmus Villemoes
2025-08-22 18:18 ` [PATCH 2/3] memtest: only call schedule() once for every 256 words Rasmus Villemoes
2025-08-22 18:18 ` [PATCH 3/3] memtest: remove use of vu_long typedef in mem_test_alt Rasmus Villemoes
2025-08-28 13:48 ` Anshul Dalal [this message]
2025-09-02 22:57 ` [PATCH 0/3] memtest performance improvements Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DCE3WWVDTYNE.R7JSUVWETMLO@ti.com \
    --to=anshuld@ti.com \
    --cc=ravi@prevas.dk \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox