From: John David Anglin <dave.anglin@bell.net>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
Sam James <sam@gentoo.org>
Cc: linux-parisc@vger.kernel.org, hppa@gentoo.org
Subject: Re: Recurring INEQUIVALENT ALIASES issues and userland corruption/crashes
Date: Tue, 19 Apr 2022 20:11:37 -0400 [thread overview]
Message-ID: <d1fe607e-ee63-184d-4d47-7fd98dc0cd8e@bell.net> (raw)
In-Reply-To: <137e0b6f4dcaceafeac4b1ecfa30e4249939028d.camel@HansenPartnership.com>
On 2022-04-19 5:52 p.m., James Bottomley wrote:
> On Tue, 2022-04-19 at 17:29 -0400, John David Anglin wrote:
>> We know that the PDC call to determine cache
>> characteristics indicates that the alias boundary on PA8800/PA8900 is
>> larger than 16 MB.
> Sorry, late to the party. What the PDC tells you is unreliable.
Are you sure? The PDC reference that I have is version 1.1E dated July 22, 2004.
That's after the c8000 and rp34xx were released.
It seems likely that the PDC firmware would have returned the value for 4 MB
if that were the case for these machines.
>
> However, the Architecture guide Appendix F says "These rules provide
> offset aliasing on 16 Mbyte boundaries, with optional support for
> offset aliasing on smaller power of two sized boundaries, and either
> restricted or unlimited space aliasing."
Correct. The Architecture that I have has an errata note changing the value
from 1 MB to 16 MB. However, if you search on equivalent aliases you will
find inconsistencies in the number of offset bits (requirement 2).
>
> So unless someone has an update to the architecture guide, 16MB as a
> cache stride is architecturally required to work. The tmpalias code in
> pacache.S is predicated on an assurance by the old HP chip designers
> that no chip was released with a cache stride greater than 4MB, meaning
> we could safely relax the 16MB architectural rules down to 4MB.
The patches that I sent change to hard coded bit definitions in pacache.S and
entry.S. This makes it easy to test any alias boundary. I went with 64 MB for
CONFIG_64BIT since a 128 MB region is only a small part of the address space.
It seemed to me unlikely that the alias boundary would be larger than the size
of the L2 cache.
I still don't know why the tmpalias code doesn't work for kernel virtual addresses.
Yet, even 4 MB seems to work fine for user virtual addresses.
As far as I can tell, space register hashing is off.
While it easy to make the tmpalias region larger, it not easy to increase SHM_COLOUR
which is currently 0x00400000.
It appears the gentoo folks are still having problems with random segmentation faults.
Yet, I'm not seeing them at anywhere near the same rate as other debian buildds.
Withe the patch, it's relatively easy to swithch between tmpalias flushing and flushing
through the user mappings. Performance is about the same.
Dave
--
John David Anglin dave.anglin@bell.net
next prev parent reply other threads:[~2022-04-20 0:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 17:52 Recurring INEQUIVALENT ALIASES issues and userland corruption/crashes Sam James
2022-03-22 18:14 ` Helge Deller
2022-03-22 18:30 ` John David Anglin
2022-03-22 19:47 ` Sam James
2022-03-22 18:19 ` John David Anglin
2022-03-22 19:37 ` Sam James
2022-03-22 19:52 ` Helge Deller
2022-03-22 20:42 ` Sam James
2022-03-22 21:04 ` John David Anglin
[not found] ` <73bf3336-9207-ba0e-1950-8cb1b7d6adc3@bell.net>
2022-03-22 20:29 ` John David Anglin
2022-03-22 20:43 ` Sam James
2022-03-22 23:59 ` John David Anglin
2022-04-05 21:13 ` John David Anglin
2022-04-12 5:18 ` Sam James
2022-04-12 12:27 ` John David Anglin
2022-04-12 13:20 ` John David Anglin
2022-04-12 23:45 ` Sam James
2022-04-19 19:52 ` Sam James
2022-04-19 21:29 ` John David Anglin
2022-04-19 21:52 ` James Bottomley
2022-04-20 0:11 ` John David Anglin [this message]
2022-04-23 20:33 ` John David Anglin
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=d1fe607e-ee63-184d-4d47-7fd98dc0cd8e@bell.net \
--to=dave.anglin@bell.net \
--cc=James.Bottomley@HansenPartnership.com \
--cc=hppa@gentoo.org \
--cc=linux-parisc@vger.kernel.org \
--cc=sam@gentoo.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