From: "Christoph Müllner" <christoph.muellner@vrull.eu>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Shuah Khan" <shuah@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Anup Patel" <apatel@ventanamicro.com>,
"Philipp Tomsich" <philipp.tomsich@vrull.eu>,
"Andrew Jones" <ajones@ventanamicro.com>,
"Guo Ren" <guoren@kernel.org>,
"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
"Björn Töpel" <bjorn@rivosinc.com>,
"Alan Stern" <stern@rowland.harvard.edu>,
"Andrea Parri" <parri.andrea@gmail.com>,
"Will Deacon" <will@kernel.org>,
"Daniel Lustig" <dlustig@nvidia.com>,
"Peter Zijlstra" <peterz@infradead.org>
Subject: Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support
Date: Mon, 27 Nov 2023 13:58:36 +0100 [thread overview]
Message-ID: <CAEg0e7jjLCEL28exKqWBUAMSRj_M9bSBxmOM-1Bu-Fpfmd8hjQ@mail.gmail.com> (raw)
In-Reply-To: <20231127-process-dinginess-cea6dd652b99@wendy>
On Mon, Nov 27, 2023 at 11:37 AM Conor Dooley
<conor.dooley@microchip.com> wrote:
>
> Hi,
>
> On Fri, Nov 24, 2023 at 08:21:37AM +0100, Christoph Muellner wrote:
> > From: Christoph Müllner <christoph.muellner@vrull.eu>
> >
> > The upcoming RISC-V Ssdtso specification introduces a bit in the senvcfg
> > CSR to switch the memory consistency model at run-time from RVWMO to TSO
> > (and back). The active consistency model can therefore be switched on a
> > per-hart base and managed by the kernel on a per-process/thread base.
> >
> > This patch implements basic Ssdtso support and adds a prctl API on top
> > so that user-space processes can switch to a stronger memory consistency
> > model (than the kernel was written for) at run-time.
> >
> > I am not sure if other architectures support switching the memory
> > consistency model at run-time, but designing the prctl API in an
> > arch-independent way allows reusing it in the future.
> >
> > The patchset also comes with a short documentation of the prctl API.
> >
> > This series is based on the second draft of the Ssdtso specification
> > which was published recently on an RVI list:
> > https://lists.riscv.org/g/tech-arch-review/message/183
> > Note, that the Ssdtso specification is in development state
> > (i.e., not frozen or even ratified) which is also the reason
> > why I marked the series as RFC.
> >
> > One aspect that is not covered in this patchset is virtualization.
> > It is planned to add virtualization support in a later version.
> > Hints/suggestions on how to implement this part are very much
> > appreciated.
> >
> > Christoph Müllner (5):
>
> I know this is an RFC, but it could probably do with a bit more compile
> testing, as:
>
> > RISC-V: Add basic Ssdtso support
>
> This patch doesn't build for rv64 allmodconfig
>
> > RISC-V: Expose Ssdtso via hwprobe API
>
> This one seems to build fine
>
> > uapi: prctl: Add new prctl call to set/get the memory consistency
> > model
> > RISC-V: Implement prctl call to set/get the memory consistency model
> > RISC-V: selftests: Add DTSO tests
>
> These don't build for:
> rv32 defconfig
> rv64 allmodconfig
> rv64 nommu
Thanks for reporting this. You are absolutely right.
In my defense, this patchset was compile-tested and got some limited
run-time testing in QEMU.
But after that, I wrote the documentation, which triggered a renaming
of several function/macro names,
and these changes did not see adequate testing. I am sorry for that.
I've already fixed the patches (addressing the issues you have
reported, plus other small issues).
To not distract the ongoing discussion, I will not send an updated
patchset right now.
In case you are interested, you can find the latest changes (rebased
on upstream/master) here:
https://github.com/cmuellner/linux/tree/ssdtso
I've also extended my local compile-test script to include all
mentioned configs.
In case you want to play a bit with these changes, you can also have a
look at the QEMU
patchset, which also got support for the prctl (which is not part of
the published mailpatch):
https://github.com/cmuellner/qemu/tree/ssdtso
With these changes, you can run the kernel self-test binary in
user-mode emulation.
BR
Christoph
prev parent reply other threads:[~2023-11-27 12:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 7:21 [RFC PATCH 0/5] RISC-V: Add dynamic TSO support Christoph Muellner
2023-11-24 7:21 ` [RFC PATCH 1/5] RISC-V: Add basic Ssdtso support Christoph Muellner
2023-11-24 7:21 ` [RFC PATCH 2/5] RISC-V: Expose Ssdtso via hwprobe API Christoph Muellner
2023-11-27 14:32 ` Samuel Holland
2023-11-27 14:36 ` Christoph Müllner
2023-11-24 7:21 ` [RFC PATCH 3/5] uapi: prctl: Add new prctl call to set/get the memory consistency model Christoph Muellner
2023-11-24 7:21 ` [RFC PATCH 4/5] RISC-V: Implement " Christoph Muellner
2023-11-24 7:21 ` [RFC PATCH 5/5] RISC-V: selftests: Add DTSO tests Christoph Muellner
2023-11-24 10:15 ` [RFC PATCH 0/5] RISC-V: Add dynamic TSO support Peter Zijlstra
2023-11-24 10:53 ` Christoph Müllner
2023-11-24 11:49 ` Peter Zijlstra
2023-11-25 2:51 ` Guo Ren
2023-11-27 11:16 ` Peter Zijlstra
2023-11-28 1:42 ` Guo Ren
[not found] ` <59da3e41-abb3-405a-8f98-c74bdf26935b@huaweicloud.com>
2023-11-24 11:54 ` Peter Zijlstra
2023-11-24 13:05 ` Michael Ellerman
2023-11-26 12:34 ` Guo Ren
2023-11-27 12:14 ` Mark Rutland
2024-02-08 11:10 ` Andrea Parri
2023-11-27 10:36 ` Conor Dooley
2023-11-27 12:58 ` Christoph Müllner [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=CAEg0e7jjLCEL28exKqWBUAMSRj_M9bSBxmOM-1Bu-Fpfmd8hjQ@mail.gmail.com \
--to=christoph.muellner@vrull.eu \
--cc=ajones@ventanamicro.com \
--cc=akpm@linux-foundation.org \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=bjorn@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=corbet@lwn.net \
--cc=dbarboza@ventanamicro.com \
--cc=dlustig@nvidia.com \
--cc=guoren@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=parri.andrea@gmail.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=philipp.tomsich@vrull.eu \
--cc=shuah@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).