From: Peter Bergner <bergner@linux.ibm.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Amrita H S <amritahs@linux.vnet.ibm.com>
Cc: libc-alpha@sourceware.org, Paul E Murphy <murphyp@linux.ibm.com>
Subject: Re: [V3] powerpc: Optimized strncmp for power10
Date: Mon, 6 May 2024 09:16:29 -0500 [thread overview]
Message-ID: <af4ae990-4f3e-44a1-b237-bc0038e13101@linux.ibm.com> (raw)
In-Reply-To: <63ec70c8-f522-4ad7-bb01-6a179bf61ac4@linaro.org>
On 5/6/24 8:04 AM, Adhemerval Zanella Netto wrote:
> If I recall correctly it was to not tie the implementation to an specific
> page size, since the ABI still allows 4k page sizes. I think both branches
> will highly unlikely to be taken, so branch prediction will most likely
> get a high frequency hit.
Even though the hardware supports 4K pages, I thought we never built it
that way and the major distros to build it with 64K pages, but I learned
there are some minor distros the use 4K pages, so I agree we should use
that here.
> We can also try to make it dynamically if you think these checks are really
> costly, this will mean to add two extra loads and possible an extra cache
> like hit (one for GLRO struct, another for dl_pagesize). I don't think this
> is worth.
I don't know that they costly, I just though that if they're useless because
we always use 64K pages, then it seems dumb to check the 4K boundary.
Since can/might have 4K pages, then the patch code is correct as is.
> Another question is whether this tests still make sense for POWER10, is it
> still that costly for cross page-page reads as for POWER8?
I'm not 100% sure and it would be something we'd need to test, but I suspect
it probably hasn't changed too much???
Peter
prev parent reply other threads:[~2024-05-06 14:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 9:58 Amrita H S
2024-05-03 21:31 ` Peter Bergner
2024-05-06 6:13 ` Florian Weimer
2024-05-06 12:55 ` Peter Bergner
2024-05-06 13:01 ` Peter Bergner
2024-05-06 14:10 ` Peter Bergner
2024-05-06 13:04 ` Adhemerval Zanella Netto
2024-05-06 14:16 ` Peter Bergner [this message]
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=af4ae990-4f3e-44a1-b237-bc0038e13101@linux.ibm.com \
--to=bergner@linux.ibm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=amritahs@linux.vnet.ibm.com \
--cc=libc-alpha@sourceware.org \
--cc=murphyp@linux.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).