All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Tomsich <philipp.tomsich@vrull.eu>
To: Anup Patel <anup@brainfault.org>
Cc: "Heiko Stübner" <heiko@sntech.de>,
	"Rob Herring" <robh@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	"linux-kernel@vger.kernel.org List"
	<linux-kernel@vger.kernel.org>, "Wei Fu" <wefu@redhat.com>,
	"Guo Ren" <guoren@kernel.org>,
	"Atish Patra" <atishp@atishpatra.org>,
	"Nick Kossifidis" <mick@ics.forth.gr>,
	"Samuel Holland" <samuel@sholland.org>,
	"Christoph Muellner" <cmuellner@linux.com>,
	krzk+dt@kernel.org, DTML <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] dt-bindings: riscv: document cbom-block-size
Date: Wed, 18 May 2022 11:20:27 +0200	[thread overview]
Message-ID: <CAAeLtUBYF5qG3TkVCwz-DjaM4xGrwm9GyEPSBYJo04g70cNO4w@mail.gmail.com> (raw)
In-Reply-To: <CAAhSdy1sG8uzg0W2Ufi=EYFB58+JZobUa9D+rcHeb4upJoMzng@mail.gmail.com>

On Wed, 18 May 2022 at 11:10, Anup Patel <anup@brainfault.org> wrote:
> > > > > +    description:
> > > > > +      Blocksize in bytes for the Zicbom cache operations. The block
> > > > > +      size is a property of the core itself and does not necessarily
> > > > > +      match other software defined cache sizes.
> > > >
> > > > What about hardware defined cache sizes? I'm scratching my head as to
> > > > what a 'software defined cache size' is.
> >
> > I agree that this should be worded better. The intent was to tell that this
> > is different from say the l1-cache-block-size.
> >
> > I.e. these values can be the same but don't need to be. But I guess I got
> > too much lead on by a kernel implementation detail (L1_CACHE_BYTES constant)
>
> Better to just call it as "the cache block-size expected by Zicbom cache
> operations" without getting details of relation with L1 cache block size.

I would make this an even stronger statement and assert that Anup's
recommended rewording (and staying away from L1 block/line sizes in
terminology) is required to accurately reflect the design of the
RISC-V CMOs.

The Zicbom operation size is in fact decoupled from the
l1-cache-block-size (as that would be the cache line size — and
therefore the size of fetches/replacements to the cache) as the
deliberations within the CMO group showed.   This is only the granule
that Zicbom instructions operate on (and there might be additional
mechanisms at work in the background that ensure that this is safe for
any given underlying cache implementation).

Cheers,
Philipp.

WARNING: multiple messages have this Message-ID (diff)
From: Philipp Tomsich <philipp.tomsich@vrull.eu>
To: Anup Patel <anup@brainfault.org>
Cc: "Heiko Stübner" <heiko@sntech.de>,
	"Rob Herring" <robh@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	"linux-kernel@vger.kernel.org List"
	<linux-kernel@vger.kernel.org>, "Wei Fu" <wefu@redhat.com>,
	"Guo Ren" <guoren@kernel.org>,
	"Atish Patra" <atishp@atishpatra.org>,
	"Nick Kossifidis" <mick@ics.forth.gr>,
	"Samuel Holland" <samuel@sholland.org>,
	"Christoph Muellner" <cmuellner@linux.com>,
	krzk+dt@kernel.org, DTML <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] dt-bindings: riscv: document cbom-block-size
Date: Wed, 18 May 2022 11:20:27 +0200	[thread overview]
Message-ID: <CAAeLtUBYF5qG3TkVCwz-DjaM4xGrwm9GyEPSBYJo04g70cNO4w@mail.gmail.com> (raw)
In-Reply-To: <CAAhSdy1sG8uzg0W2Ufi=EYFB58+JZobUa9D+rcHeb4upJoMzng@mail.gmail.com>

On Wed, 18 May 2022 at 11:10, Anup Patel <anup@brainfault.org> wrote:
> > > > > +    description:
> > > > > +      Blocksize in bytes for the Zicbom cache operations. The block
> > > > > +      size is a property of the core itself and does not necessarily
> > > > > +      match other software defined cache sizes.
> > > >
> > > > What about hardware defined cache sizes? I'm scratching my head as to
> > > > what a 'software defined cache size' is.
> >
> > I agree that this should be worded better. The intent was to tell that this
> > is different from say the l1-cache-block-size.
> >
> > I.e. these values can be the same but don't need to be. But I guess I got
> > too much lead on by a kernel implementation detail (L1_CACHE_BYTES constant)
>
> Better to just call it as "the cache block-size expected by Zicbom cache
> operations" without getting details of relation with L1 cache block size.

I would make this an even stronger statement and assert that Anup's
recommended rewording (and staying away from L1 block/line sizes in
terminology) is required to accurately reflect the design of the
RISC-V CMOs.

The Zicbom operation size is in fact decoupled from the
l1-cache-block-size (as that would be the cache line size — and
therefore the size of fetches/replacements to the cache) as the
deliberations within the CMO group showed.   This is only the granule
that Zicbom instructions operate on (and there might be additional
mechanisms at work in the background that ensure that this is safe for
any given underlying cache implementation).

Cheers,
Philipp.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2022-05-18  9:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 21:41 [PATCH v2 0/2] riscv: implement Zicbom-based CMO instructions + the t-head variant Heiko Stuebner
2022-05-11 21:41 ` Heiko Stuebner
2022-05-11 21:41 ` [PATCH v2 1/3] dt-bindings: riscv: document cbom-block-size Heiko Stuebner
2022-05-11 21:41   ` Heiko Stuebner
2022-05-12  4:18   ` Anup Patel
2022-05-12  4:18     ` Anup Patel
2022-05-13 10:28     ` Christoph Müllner
2022-05-13 10:28       ` Christoph Müllner
2022-05-18  0:25   ` Rob Herring
2022-05-18  0:25     ` Rob Herring
2022-05-18  8:22     ` Philipp Tomsich
2022-05-18  8:22       ` Philipp Tomsich
2022-05-18  9:02       ` Heiko Stübner
2022-05-18  9:02         ` Heiko Stübner
2022-05-18  9:10         ` Anup Patel
2022-05-18  9:10           ` Anup Patel
2022-05-18  9:20           ` Philipp Tomsich [this message]
2022-05-18  9:20             ` Philipp Tomsich
2022-05-25 15:14     ` Heiko Stübner
2022-05-25 15:14       ` Heiko Stübner
2022-05-11 21:41 ` [PATCH v2 2/3] riscv: Implement Zicbom-based cache management operations Heiko Stuebner
2022-05-11 21:41   ` Heiko Stuebner
2022-05-12  4:19   ` Anup Patel
2022-05-12  4:19     ` Anup Patel
2022-05-13 13:38     ` Guo Ren
2022-05-13 13:38       ` Guo Ren
2022-05-16  6:00   ` Christoph Hellwig
2022-05-16  6:00     ` Christoph Hellwig
2022-05-11 21:41 ` [PATCH v2 3/3] riscv: implement cache-management errata for T-Head SoCs Heiko Stuebner
2022-05-11 21:41   ` Heiko Stuebner
2022-05-12  4:40   ` Anup Patel
2022-05-12  4:40     ` Anup Patel
2022-05-13 13:37     ` Guo Ren
2022-05-13 13:37       ` Guo Ren

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=CAAeLtUBYF5qG3TkVCwz-DjaM4xGrwm9GyEPSBYJo04g70cNO4w@mail.gmail.com \
    --to=philipp.tomsich@vrull.eu \
    --cc=anup@brainfault.org \
    --cc=atishp@atishpatra.org \
    --cc=cmuellner@linux.com \
    --cc=devicetree@vger.kernel.org \
    --cc=guoren@kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mick@ics.forth.gr \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wefu@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.