From: Dave Hansen <dave.hansen@intel.com>
To: Mateusz Guzik <mjguzik@gmail.com>, x86@kernel.org
Cc: glx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, hpa@zytor.com,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
olichtne@redhat.com, atomasov@redhat.com, aokuliar@redhat.com
Subject: Re: performance anomaly in rep movsq/movsb as seen on Sapphire Rapids executing sync_regs()
Date: Wed, 3 Dec 2025 13:37:06 -0800 [thread overview]
Message-ID: <4c11854e-74d8-4e6e-92a9-c025ef330fcd@intel.com> (raw)
In-Reply-To: <mwwusvl7jllmck64xczeka42lglmsh7mlthuvmmqlmi5stp3na@raiwozh466wz>
On 11/26/25 22:55, Mateusz Guzik wrote:
> I figured movsq still sucks on the uarch, so I patched the kernel to use
> movsb instead, but performance barely budged.
>
> However, forcing the thing to do the copy with regular stores in
> memcpy_orig (32 bytes per loop iteration + 8 bytes tail) unclogs it.
Any chance this can be reproduced in userspace somehow? Does any old
copy of 168 bytes do better with regular stores than rep movsq?
prev parent reply other threads:[~2025-12-03 21:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 6:55 performance anomaly in rep movsq/movsb as seen on Sapphire Rapids executing sync_regs() Mateusz Guzik
2025-11-27 9:58 ` david laight
2025-12-03 21:35 ` Dave Hansen
2025-12-03 21:37 ` Dave Hansen [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=4c11854e-74d8-4e6e-92a9-c025ef330fcd@intel.com \
--to=dave.hansen@intel.com \
--cc=aokuliar@redhat.com \
--cc=atomasov@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=glx@linutronix.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mjguzik@gmail.com \
--cc=olichtne@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@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