[PATCH v2 1/2] x86: Improve large memset perf with non-temporal stores [RHEL-29312]

Sam James sam@gentoo.org
Fri Jul 12 07:12:36 GMT 2024


DJ Delorie <dj@redhat.com> writes:

> Noah Goldstein <goldstein.w.n@gmail.com> writes:
>> Using non-temporal stores can be up to 3x faster on ICX and 2x faster
>> on SKX. Historically, these numbers would not have been so good
>> because of the zero-over-zero writeback optimization that `rep stosb`
>> is able to do. But, the zero-over-zero writeback optimization has been
>> removed as a potential side-channel attack, so there is no longer any
>> good reason to only rely on `rep stosb` for large memsets. On the flip
>> size, non-temporal writes can avoid data in their RFO requests saving
>> memory bandwidth.
>
> I'm actually working on RHEL-29312 that you reference in the subject
> (thanks for the reference, but please don't reference downstream tickets
> in upstream patches).

Can I be annoying and dissent here? I don't like the idea of throwing
away provenance. If you're working on it because of something you can
reference, you can and you should.

What you should also do is file a glibc bug with the relevant
information extracted if someone is likely to want to read up on it, so
they don't have to make an account elsehwere or something.

But I don't think chucking away information when we know it is good. It
might well be important when bisecting or if a revert is needed way down
the line.

> [...]

thanks,
sam


More information about the Libc-alpha mailing list