From: Tomas Mudrunka <tomas.mudrunka@gmail.com>
To: tomas.mudrunka@gmail.com
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, rppt@kernel.org
Subject: CPU Cache in Linux MemTest
Date: Fri, 23 Jan 2026 15:49:08 +0100 [thread overview]
Message-ID: <20260123144908.65146-1-tomas.mudrunka@gmail.com> (raw)
In-Reply-To: <20260122150116.3409572-1-tomas.mudrunka@gmail.com>
Also it seems that CPU cache is not disabled during early_memtest()
and there is no easy way to disable it globally at this stage of boot.
However it can be invalidated using macros like clflush() and mb().
Unfortunately those are very x86 architecture-specific.
This probably means we can use ifdefs to call the correct cache flush
macro for given architecture and disable the test altogether for
unsupported architectures.
Alternatively it might be possible to do large write somewhere else
to flush the cache. After all current memtest seems to heavily rely
solely on the fact the test pattern is written in large regions at time.
It might be possible to do opportunistic cache flush based on the same
ifdef logic when flush instruction is available on given architecture
for use in existing memtest code.
Hopefully even implementing some simple abstraction layer for this.
Can you please give me some feedback on this approach?
Thanks
Tom
prev parent reply other threads:[~2026-01-23 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 15:01 [PATCH] MemTest: Test RAM address bus for stuck bits Tomas Mudrunka
2026-01-23 14:49 ` Tomas Mudrunka [this message]
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=20260123144908.65146-1-tomas.mudrunka@gmail.com \
--to=tomas.mudrunka@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@kernel.org \
/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