public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <piggin@cyberone.com.au>
To: Jamie Lokier <jamie@shareable.org>
Cc: akpm@osdl.org, torvalds@osdl.org, linux-kernel@vger.kernel.org,
	richard.brunner@amd.com
Subject: Re: [PATCH] Mutilated form of Andi Kleen's AMD prefetch errata patch
Date: Tue, 30 Sep 2003 18:01:10 +1000	[thread overview]
Message-ID: <3F793846.2000407@cyberone.com.au> (raw)
In-Reply-To: <20030930073814.GA26649@mail.jlokier.co.uk>



Jamie Lokier wrote:

>This builds upon Andi Kleen's excellent patch for the AMD prefetch bug
>workaround.  It is applies to 2.6.0-test6.
>
>There are four changes on top of Andi's recent patch:
>
>   1. The workaround code is only included when compiling a kernel
>      optimised for AMD processors with the bug.  For kernels optimised
>      for a different processor, there is no code size overhead.
>
>      This will make some people happier.
>
>      It will make some people unhappier, because it means a generic
>      kernel on an AMD will run fine, but won't fixup _userspace_
>      prefetch faults.  More on this below.
>
>   2. Nevertheless, when a kernel _not_ optimised for those AMD processors
>      is run on one, the "alternative" mechanism now correctly replaces
>      prefetch instructions with nops.
>
>   3. The is_prefetch() instruction decoder now handles all cases of
>      funny GDT and LDT segments, checks limits and so on.  As far as I
>      can see, there are no further bugs or flaws in that part.
>
>   4. A consequence of the is_prefetch() change is that, despite the
>      longer C code (rarely used code, for segments), is_prefetch()
>      should run marginally faster now because the access_ok() calls are
>      not required.  They're subsumed into the segment limit
>      calculation.
> 
>Like Andi's patch, this removes 10k or so from current x86 kernels by
>removing the silly conditional from the prefetch() function.
>
>Controversial point coming up!
>

It sounds good Jamie, but could you possibly compile it in
unconditionally? Otherwise it introduces yet another caveat to the CPU
selection / build system. This can be addressed seperately.

I don't think anyone advocates attempting to handle this nicely with the
current CPU selection system, nor were they targeting this patch in
particular. It just kicked off a discussion about the shortfalls of the
selection system.



  reply	other threads:[~2003-09-30  8:01 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-30  7:38 [PATCH] Mutilated form of Andi Kleen's AMD prefetch errata patch Jamie Lokier
2003-09-30  8:01 ` Nick Piggin [this message]
2003-09-30 13:22 ` Dave Jones
2003-09-30 13:39   ` Jamie Lokier
2003-09-30 13:53     ` Dave Jones
2003-09-30 14:45       ` Jamie Lokier
2003-09-30 15:08         ` Dave Jones
2003-09-30 16:54           ` Jamie Lokier
2003-09-30 17:26             ` Dave Jones
2003-09-30 23:55               ` Jamie Lokier
2003-10-01  0:27                 ` Andrew Morton
     [not found] <20030930073814.GA26649@mail.jlokier.co.uk.suse.lists.linux.kernel>
     [not found] ` <20030930132211.GA23333@redhat.com.suse.lists.linux.kernel>
     [not found]   ` <20030930133936.GA28876@mail.shareable.org.suse.lists.linux.kernel>
     [not found]     ` <20030930135324.GC5507@redhat.com.suse.lists.linux.kernel>
     [not found]       ` <20030930144526.GC28876@mail.shareable.org.suse.lists.linux.kernel>
     [not found]         ` <20030930150825.GD5507@redhat.com.suse.lists.linux.kernel>
     [not found]           ` <20030930165450.GF28876@mail.shareable.org.suse.lists.linux.kernel>
     [not found]             ` <20030930172618.GE5507@redhat.com.suse.lists.linux.kernel>
2003-09-30 19:08               ` Andi Kleen
2003-09-30 20:08                 ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2003-10-01  1:54 Nakajima, Jun
2003-10-01  2:07 ` Andrew Morton
2003-10-01  2:08 ` Mike Fedyk
2003-10-01  2:23 Nakajima, Jun
2003-10-01  2:51 ` Jamie Lokier
2003-10-01  3:14   ` Andrew Morton
2003-10-01  4:30 Nakajima, Jun
2003-10-01  5:38 ` Jamie Lokier
2003-10-01  5:48   ` Andrew Morton
2003-10-01  6:13     ` Jamie Lokier
2003-10-01  6:32       ` Andrew Morton
2003-10-01  6:57         ` Jamie Lokier
     [not found] <7F740D512C7C1046AB53446D3720017304AFCF@scsmsx402.sc.intel.com.suse.lists.linux.kernel>
     [not found] ` <20031001053833.GB1131@mail.shareable.org.suse.lists.linux.kernel>
     [not found]   ` <20030930224853.15073447.akpm@osdl.org.suse.lists.linux.kernel>
     [not found]     ` <20031001061348.GE1131@mail.shareable.org.suse.lists.linux.kernel>
     [not found]       ` <20030930233258.37ed9f7f.akpm@osdl.org.suse.lists.linux.kernel>
2003-10-01  6:47         ` Andi Kleen
2003-10-01  7:00           ` Andrew Morton
2003-10-01  7:06             ` Andi Kleen
2003-10-01  7:31               ` Jamie Lokier
2003-10-01  7:41                 ` Andi Kleen
2003-10-01  8:02                 ` Hugh Dickins
2003-10-01  8:49                   ` Andi Kleen
2003-10-01  9:33                   ` Jamie Lokier
2003-10-01 14:51                     ` Andrew Morton
2003-10-01 14:56                       ` Andi Kleen
2003-10-01 15:19                         ` Andrew Morton
2003-10-01 15:24                           ` Andi Kleen
2003-10-01 16:18                       ` Jamie Lokier
2003-10-01  7:20           ` Jamie Lokier
2003-10-01  7:39             ` Andi Kleen
2003-10-01  8:20               ` Jamie Lokier
     [not found]         ` <20031001065705.GI1131@mail.shareable.org.suse.lists.linux.kernel>
2003-10-01  7:15           ` Andi Kleen
2003-10-01  7:24           ` Andi Kleen
2003-10-01  7:55             ` Jamie Lokier
2003-10-01  8:00               ` Andi Kleen

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=3F793846.2000407@cyberone.com.au \
    --to=piggin@cyberone.com.au \
    --cc=akpm@osdl.org \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.brunner@amd.com \
    --cc=torvalds@osdl.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