public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Evan Green' <evan@rivosinc.com>, Atish Patra <atishp@atishpatra.org>
Cc: Conor Dooley <conor@kernel.org>,
	Anup Patel <apatel@ventanamicro.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Heiko Stuebner <heiko@sntech.de>, "Marc Zyngier" <maz@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Palmer Dabbelt <palmer@rivosinc.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Jisheng Zhang <jszhang@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Greentime Hu <greentime.hu@sifive.com>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	Andrew Jones <ajones@ventanamicro.com>
Subject: RE: [PATCH v2] RISC-V: Probe misaligned access speed in parallel
Date: Thu, 21 Sep 2023 10:22:21 +0000	[thread overview]
Message-ID: <a94490f6b1dd43d5985a8b14aa93bd27@AcuMS.aculab.com> (raw)
In-Reply-To: <CALs-HsvvnMFErCtShB-30xO8LR4M03riYomZy3FnvEghRua_3g@mail.gmail.com>

...
> > For probing alignment speed, you just care about running it on that
> > cpu. Correct ?
> 
> For this we care both about not migrating to other CPUs, and also
> secondarily minimizing disturbances while the test is being run.
> Usually I equate pre-emption with migration, but in this case I think
> the worker threads are bound to that CPU. So I'll keep the
> preempt_disable/enable where it is, since it's harmless for CPUs other
> than 0, but useful for 0. I also like it for readability as it
> highlights the critical section (as a reader, "is preemption disabled"
> would be one of my first questions when studying this).

You need to disable pre-emption to get any kind of meaningful answer.

But why do you need to run the test on more than the boot cpu?
If you've a heterogenous mix of cpu any code that looks at the answer
is going to behave incorrectly unless it has also disabled pre-emption
or is bound to a cpu.

One obvious use of the result is to setup some static branches.
But that assumes all cpu are the same.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  reply	other threads:[~2023-09-21 20:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 19:38 [PATCH v2] RISC-V: Probe misaligned access speed in parallel Evan Green
2023-09-20 21:03 ` Conor Dooley
2023-09-20 21:27   ` Atish Patra
2023-09-20 22:06     ` Evan Green
2023-09-20 22:25       ` Conor Dooley
2023-09-29 11:19         ` Conor Dooley
2023-09-20 22:57       ` Atish Patra
2023-09-20 23:54         ` Evan Green
2023-09-21 10:22           ` David Laight [this message]
2023-09-21 16:44             ` Evan Green
2023-09-21 16:49               ` Evan Green
2023-09-21  2:41 ` Jisheng Zhang
2023-11-02 20:20 ` patchwork-bot+linux-riscv

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=a94490f6b1dd43d5985a8b14aa93bd27@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=ajones@ventanamicro.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=apatel@ventanamicro.com \
    --cc=atishp@atishpatra.org \
    --cc=conor.dooley@microchip.com \
    --cc=conor@kernel.org \
    --cc=evan@rivosinc.com \
    --cc=greentime.hu@sifive.com \
    --cc=heiko@sntech.de \
    --cc=jszhang@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.com \
    --cc=paul.walmsley@sifive.com \
    /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