Linux PARISC architecture development
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: John David Anglin <dave@parisc-linux.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Helge Deller <deller@gmx.de>,
	linux-parisc@vger.kernel.org
Subject: Re: ARCH_DMA_MINALIGN on PA-RISC
Date: Sat, 27 Jul 2024 11:06:38 -0400	[thread overview]
Message-ID: <f5c8171e-65f1-4009-97f8-6a33fd1d3573@bell.net> (raw)
In-Reply-To: <5b706825-a022-85a-4fba-14975654dec0@redhat.com>

On 2024-07-27 6:24 a.m., Mikulas Patocka wrote:
>>> L1_CACHE_SHIFT can be set to arbitrary value - setting it badly could
>>> degrade performance, but it shouldn't cause data corruption.
>> If we set to an arbitrary value, we need to document why we do it. The naming
>> suggests that L1_CACHE_BYTES should be the L1 cache length.
> It's hard to say what should we set it to, if we have different
> microarchitectures with different cache line size. ARM64 sets it to 64,
> despite the fact that there are some ARM64 machines with 128-byte cache
> line.
>
> L1_CACHE_BYTES is a matter of performance. Do you have some benchmarks, so
> that you could try to tune it?
>
> The commit a01fece2e4185ac173abd16d10304d73d47ebf00 says that setting
> L1_CACHE_BYTES == 16 improves performance.
I can't recall what tests were used at the time.  However, L1_CACHE_BYTES == 16 reduces
the kernel size and this probably helps performance.  16 bytes would be the minimum alignment
for ldcw locks.

The comment about the L1 line length being 16 bytes is wrong.  The notes we have from the
PA8800 ERS clearly state that the L1 stride is 128 bytes.  The notes show how to flush the L1
cache.  I think the L1 and L2 lengths have always been the same.

Dave

-- 
John David Anglin  dave.anglin@bell.net


  reply	other threads:[~2024-07-27 15:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 18:17 ARCH_DMA_MINALIGN on PA-RISC Mikulas Patocka
2024-07-24 18:48 ` John David Anglin
2024-07-24 19:25 ` James Bottomley
2024-07-25 16:45   ` John David Anglin
2024-07-25 17:27     ` Mikulas Patocka
2024-07-25 17:43       ` James Bottomley
2024-07-25 17:46         ` Mikulas Patocka
2024-07-25 19:19           ` James Bottomley
2024-07-25 19:13       ` John David Anglin
2024-07-25 20:05         ` John David Anglin
2024-07-25 20:36           ` Mikulas Patocka
2024-07-25 21:29             ` John David Anglin
2024-07-27 10:24               ` Mikulas Patocka
2024-07-27 15:06                 ` John David Anglin [this message]
2024-07-25 17:37   ` Mikulas Patocka

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=f5c8171e-65f1-4009-97f8-6a33fd1d3573@bell.net \
    --to=dave.anglin@bell.net \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dave@parisc-linux.org \
    --cc=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=mpatocka@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox