From: Andi Kleen <andi@firstfloor.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andi Kleen <andi@firstfloor.org>,
mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: x86-64: memset()/memcpy() not fully standards compliant
Date: Fri, 6 Jan 2012 11:37:34 +0100 [thread overview]
Message-ID: <20120106103734.GV11715@one.firstfloor.org> (raw)
In-Reply-To: <4F06D979020000780006AC49@nat.nue.novell.com>
> I checked the most recent K8 (Hammer) and Pentium4 documentation,
> and didn't find mention of anything related. So pointing out where you
Sorry don't really plan to do any errata archaeology for this folly.
Maybe it got fixed in the latest versions, I remember them being there
on some early ones at least.
> >> > so making any of that slower is not a good idea.
> >> >
> >>
> >> Obviously not, but I'm perfectly fine turning REP_GOOD off on old broken
> >> CPUs.
> >
> > That would be even worse.
>
> How could you allow a CPU fall under REP_GOOD is its rep
> implementation is buggy.
The kernel never does >4GB copies, memsets, so it's not buggy.
It's just like any other obscure errata that doesn't matter because
it's not exercised.
REP_GOOD just means "string instructions are faster for 4K operations"
>
> > You would slow a critical fast path operation down for something
> > that never happens?!?
>
> It does happen, just (so far) not in-tree. It's a latent problem that's
> just waiting for someone else to run into. Apart from large bootmem
> allocations (where not even the latency of the memory clearing
Modern kernels are bootmem less.
> matters in any way, there's nothing I know of that would prevent
> someone from vmalloc()-ing a huge block of memory and then
> calling memset() on it (which ought to be tolerable in a preemptable
> kernel at least).
I bet there are more "int"s in the allocators and other code. It would
surprise me if it worked even with a changed memset.
Besides it obviously would be a bad idea on non preemptive kernels,
and since that can always happen it would be bad code, hopefully
never hitting any trees.
If you need it in Xen please just add the cmps there.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2012-01-06 10:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 14:04 x86-64: memset()/memcpy() not fully standards compliant Jan Beulich
2012-01-05 15:27 ` hpanvin@gmail.com
2012-01-05 18:28 ` Andi Kleen
2012-01-05 23:22 ` H. Peter Anvin
2012-01-06 1:47 ` Andi Kleen
2012-01-06 2:03 ` H. Peter Anvin
2012-01-06 7:22 ` Jan Beulich
2012-01-06 9:49 ` Andi Kleen
2012-01-06 10:22 ` Jan Beulich
2012-01-06 10:37 ` Andi Kleen [this message]
2012-01-06 10:50 ` Jan Beulich
2012-01-06 11:08 ` Andi Kleen
2012-01-06 12:25 ` Jan Beulich
2012-01-06 19:44 ` Andi Kleen
2012-01-06 23:12 ` H. Peter Anvin
2012-01-06 11:08 ` Ingo Molnar
2012-01-06 20:40 ` Valdis.Kletnieks
2012-01-09 8:29 ` Jan Beulich
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=20120106103734.GV11715@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=JBeulich@suse.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.