mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Andi Kleen" <andi@firstfloor.org>
Cc: <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, 06 Jan 2012 11:22:33 +0100	[thread overview]
Message-ID: <4F06D979020000780006AC49@nat.nue.novell.com> (raw)
In-Reply-To: <20120106094922.GU11715@one.firstfloor.org>

>>> On 06.01.12 at 10:49, Andi Kleen <andi@firstfloor.org> wrote:
> On Thu, Jan 05, 2012 at 06:03:23PM -0800, H. Peter Anvin wrote:
>> On 01/05/2012 05:47 PM, Andi Kleen wrote:
>> >>
>> >> Is that still true, and do we even use string instructions still on
>> >> those old CPUs?  Jan's fixes don't introduce any additional delays in
>> >> the non-string-instruction paths.
>> > 
>> > Yes various of the CPUs with bugs used string instructions.
>> > 
>> 
>> Which CPUs are you talking about here?
> 
> This was various iterations of K8 and PSC. Early Meroms may also have
> had issues (not 100% sure).

I checked the most recent K8 (Hammer) and Pentium4 documentation,
and didn't find mention of anything related. So pointing out where you
found something relevant would be helpful. (And yes, as indicated in
my original mail I too seem to recall there being problems in this area,
but upon closer checking yesterday they all turned out unrelated to
this code.)

>> > Both string and non string instructions are used on modern CPUs,
>> > 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.

> 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
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).

Jan


  reply	other threads:[~2012-01-06 10:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 14:04 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 [this message]
2012-01-06 10:37             ` Andi Kleen
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=4F06D979020000780006AC49@nat.nue.novell.com \
    --to=jbeulich@suse.com \
    --cc=andi@firstfloor.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®