From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: John David Anglin <dave.anglin@bell.net>
Cc: Helge Deller <deller@gmx.de>, linux-parisc@vger.kernel.org
Subject: Re: [PATCH] parisc: adjust L1_CACHE_BYTES to 128 bytes on PA8800 and PA8900 CPUs
Date: Thu, 24 Sep 2015 07:20:27 -0700 [thread overview]
Message-ID: <1443104427.2203.17.camel@HansenPartnership.com> (raw)
In-Reply-To: <17069A9B-BA68-4BDA-9342-83E33A22D547@bell.net>
On Tue, 2015-09-22 at 20:12 -0400, John David Anglin wrote:
> I question the the atomic hash changes as the original defines are
> taken directly from generic code.
It's about scaling. The fewer locks, the more contention in a hash lock
system. The interesting question is where does the line tip over so
that we see less speed up for more locks.
> Optimally, we want one spinlock per cacheline. Why do we care about
> the size of atomic_t?
OK, so I think we're not using the word 'line size' in the same way.
When Linux says 'line size' it generally means the cache ownership line
size: the minimum block the inter cpu coherence operates on. Most of
the architectural evidence for PA systems suggests that this is 16 We
should be able to get this definitively: it's however many lower bits of
a virtual address the LCI instruction truncates. 128 seems to be the
cache burst fill size (the number of bytes that will be pulled into the
cache by a usual operation touching any byte in the area). For
streaming operations, the burst fill size is what we want to use, but
for coherence operations it's the ownership line size. The reason is
that different CPUs can own adjacent lines uncontended, so one spinlock
per this region is optimal.
The disadvantage to padding things out to the cache burst fill size is
that we blow the cache footprint: data is too far apart and we use far
more cache than we should meaning the cache thrashes much sooner as you
load up the CPU. On SMP systems, Linux uses SMP_CACHE_BYTES ==
L1_CACHE_BYTES for padding on tons of critical structures if it's too
big we'll waste a lot of cache footprint for no gain.
James
next prev parent reply other threads:[~2015-09-24 14:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 16:20 [PATCH] parisc: adjust L1_CACHE_BYTES to 128 bytes on PA8800 and PA8900 CPUs Helge Deller
2015-09-03 13:30 ` James Bottomley
2015-09-03 13:57 ` James Bottomley
2015-09-05 21:30 ` Helge Deller
2015-09-22 16:20 ` Helge Deller
2015-09-23 0:12 ` John David Anglin
2015-09-23 19:30 ` Helge Deller
2015-09-23 21:00 ` John David Anglin
2015-09-24 14:20 ` James Bottomley [this message]
2015-09-24 16:39 ` John David Anglin
2015-09-24 16:57 ` James Bottomley
2015-09-25 12:20 ` John David Anglin
2015-09-25 15:56 ` John David Anglin
2015-09-27 16:27 ` [PATCH] parisc: " John David Anglin
2015-09-28 15:57 ` Helge Deller
2015-09-28 20:00 ` 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=1443104427.2203.17.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=dave.anglin@bell.net \
--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;
as well as URLs for NNTP newsgroup(s).