Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: John David Anglin <dave.anglin@bell.net>
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: Thu, 25 Jul 2024 22:36:42 +0200 (CEST)	[thread overview]
Message-ID: <436be3ae-a1b8-a14d-88f9-447355959064@redhat.com> (raw)
In-Reply-To: <ff54aa24-15be-4bca-8b9e-1b1166b0e0d9@bell.net>

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]



On Thu, 25 Jul 2024, John David Anglin wrote:

> On 2024-07-25 3:13 p.m., John David Anglin wrote:
> >> L1_CACHE_BYTES is a performance hint that is used to avoid cache line
> >> ping-pong when multiple CPUs modify nearby data.
> > Our L1_CACHE_BYTES define is wrong.  PA7100 has a L1 length of 16 bytes.
> > PA7200 to PA7300LC have a length of 32 bytes.  PA8000 to PA8700 have a length of 64
> > bytes.  PA8800 and PA8900 have a L1 length of 128 bytes (this is from ERS D_Stride).
> >
> The attached patch fixes the defines for L1_CACHE_SHIFT, L1_CACHE_BYTES and
> ARCH_DMA_MINALIGN.  I left ARCH_DMA_MINALIGN at 16 as I believe this gives
> 128-byte alignment.
> 
> Testing.
> 
> Dave
> 
> -- 
> John David Anglin  dave.anglin@bell.net

How does ARCH_DMA_MINALIGN == 16 give 128-byte alignment? I think that 
ARCH_DMA_MINALIGN needs to be 128 to avoid the possibility of DMA transfer 
corruption.

L1_CACHE_SHIFT can be set to arbitrary value - setting it badly could 
degrade performance, but it shouldn't cause data corruption.

The commit d93277b9839b0bde06238a7a7f644114edb2ad4a says that setting 
L1_CACHE_SHIFT == 7 causes networking performance degradation on arm64. I 
don't know how much is this related to parisc.

Mikulas

  reply	other threads:[~2024-07-25 20:36 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 [this message]
2024-07-25 21:29             ` John David Anglin
2024-07-27 10:24               ` Mikulas Patocka
2024-07-27 15:06                 ` John David Anglin
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=436be3ae-a1b8-a14d-88f9-447355959064@redhat.com \
    --to=mpatocka@redhat.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dave.anglin@bell.net \
    --cc=dave@parisc-linux.org \
    --cc=deller@gmx.de \
    --cc=linux-parisc@vger.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