public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mtest: Disable dcache during test
Date: Sat, 11 Aug 2012 20:49:35 +0200 (CEST)	[thread overview]
Message-ID: <559399546.2303831.1344710975770.JavaMail.root@advansee.com> (raw)
In-Reply-To: <201208111350.10837.vapier@gentoo.org>

Hi Mike,

On 08/11/2012 19:50, Mike Frysinger wrote:
> On Saturday 11 August 2012 10:17:04 Beno?t Th?baudeau wrote:
> > On 08/11/2012 05:18 AM, Mike Frysinger wrote:
> > > On Friday 10 August 2012 15:16:15 Beno?t Th?baudeau wrote:
> > > > mtest is supposed to test many types of memory accesses in many
> > > > different
> > > > conditions. If dcache is enabled, memory accesses are likely
> > > > bursts, and
> > > > some memory accesses are simply skipped. Hence, dcache should
> > > > be
> > > > disabled
> > > > during mtest operation so that what mtest actually tests is not
> > > > masked by
> > > > dcache.
> > > 
> > > if you want dcache disabled, then why don't you run `dcache off`
> > > first ?  i
> > > think it's useful to be able to do both, and forcing it one way
> > > is
> > > wrong.
> > > 
> > > thus, NAK from me.
> > 
> > Because you will very likely trust mtest and forget about running
> > `dcache
> > off` first, so you may then be happy about falsely positive mtest
> > results.
> 
> there are a lot of commands in u-boot that people could "easily
> forget" to
> tweak and have it do the wrong thing.  imo, mtest running in the
> active
> cache/memory settings is the *expected* behavior rather than having
> it
> silently reconfigure the system behind the back of the user.

IMO, mtest is supposed to test the underlying memory as it advertises, not the
dcache system, so this is what people will expect from it, and this should be
the default behavior. If dcache is needed in some cases, it should be an
explicit choice, not the default one. People should not have to think about
dcache being supported or enabled on their platform when running mtest. If
dcache is added as a command line option to mtest, it will also appear in its
help message, which will be a reminder, so there will be nothing made really
silently. On the contrary, if dcache is left enabled by default, this will be
completely unknown from the user, and there will not even be a reminder that
disabling dcache manually should be considered.

> > Moreover, I can't find any sense or usefulness in running mtest
> > with
> > dcache enabled.
> 
> it can be useful to stress test the system with cache enabled.  i
> recall
> during some early porting work that being able to test both caught
> bugs that
> we might have missed otherwise.

OK, but this is not the main purpose of mtest. Here, you used it as a system
stress test tool, not really as a memory stress test tool. So I agree that
leaving dcache enabled should be an option, but not the default behavior.

> > If there is really a need for running mtest with dcache enabled, an
> > option
> > (disabled by default) could be added to the command line to tell
> > mtest not
> > to disable dcache.
> 
> we already have such an option: dcache off; mtest; dcache on
> -mike

See my comment above. IMO, dcache off should be the default for mtest.

If you really don't want that, the least should be to have a big warning printed
both in mtest help message and when running mtest with dcache enabled.

Best regards,
Beno?t

  reply	other threads:[~2012-08-11 18:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 19:16 [U-Boot] [PATCH] mtest: Disable dcache during test Benoît Thébaudeau
2012-08-11  3:18 ` Mike Frysinger
2012-08-11 14:17   ` Benoît Thébaudeau
2012-08-11 17:50     ` Mike Frysinger
2012-08-11 18:49       ` Benoît Thébaudeau [this message]
2012-09-02 16:30     ` Wolfgang Denk
2012-09-03 14:25       ` Benoît Thébaudeau
2012-09-03 16:50         ` Albert ARIBAUD
2012-09-03 21:14           ` Benoît Thébaudeau
2012-09-03 23:30             ` Graeme Russ
2012-09-04  6:41               ` Wolfgang Denk
2012-09-04  6:43                 ` Graeme Russ
2012-09-04  7:23         ` Wolfgang Denk
     [not found] <CANYL96C2=fYHoTAp0SQird-Yz1W2JPq22U=3q4ZFKgwomXxODA@mail.gmail.com>
2012-08-11 20:05 ` Benoît Thébaudeau
2012-08-11 20:15   ` Mike Frysinger
2012-08-11 20:25     ` Benoît Thébaudeau
2012-08-14  6:27     ` Albert ARIBAUD

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=559399546.2303831.1344710975770.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.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