From: Andi Kleen <ak@suse.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <ak@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.0-test3-mm1: scheduling while atomic (ext3?)
Date: Wed, 13 Aug 2003 17:32:35 +0200 [thread overview]
Message-ID: <20030813153235.GB21081@wotan.suse.de> (raw)
In-Reply-To: <1060788009.8957.5.camel@dhcp23.swansea.linux.org.uk>
On Wed, Aug 13, 2003 at 04:20:11PM +0100, Alan Cox wrote:
> On Mer, 2003-08-13 at 15:20, Andi Kleen wrote:
> > stuff is basically useless in the kernel because it only helps with data
> > sets significantly bigger than your cache, and we usually only deal
> > with 4K chunks of everything.
>
> Could be. I didnt write that code. I think Manfred also played with the
> copy tricks that came from the AMD slides.
The AMD slides assume all very big data sets ;-)
I would recommend to remove it.
> > Of course it should be fixed, but the fix as it is a bug workaround
> > doesn't have to be very fast. So it would be ok to just clear the 3dnow bit.
> > But then to handle the K6 case (which is interesting, I didn't know) too it
> > would be probably better to define a separate bit.
>
> What else checks the 3Dnow bit ?
Nothing in kernel AFAIK, but it's possible that it is used by user space
reading /proc/cpuinfo.
> >
> > Ok. I will do that when I'm back next week unless someone beats me
> > to it ;-)
>
> Some kind of "has prefetch and its actually useful" 8)
X86_FEATURE_PREFETCHW
X86_FEATURE_PREFETCH3DNOW
(note I didn't volunteer to write alternative3 for the later,
someone else has to do that if they want it ;-)
> > But is it slower than an aligned execution? If yes I would prefer my
> > solution because it keeps the fast path as fast as possible.
>
> Has AMD confirmed that your solution is ok for the K7 as well as K8 - ie
> that if we hit the errata the fixup recovers the CPU from whatever
> lunatic state it is now in ?
My solution is a fix as the problem is described in the Opteron
Specification Update (and also as our own testing showed - we discovered
the problem originally)
The Errata is basically: When there is a prefetch and a load for the
same address in flight and the load faults and the CPU is in a
very specific complicated state then the Exception is reported
on the prefetch, not the fault.
The fix just handles the exception and doesn't crash.
At least on Opteron it can be also fixed with a magic bit in the BIOS,
maybe that's possible on XP too. But I opted to work around it in the kernel
to not force all people to get a new BIOS.
BTW we saw it mainly in the x86-64 copy_*_user and csum_copy_* functions
which do also prefetches. LTP would sometimes trigger it when it tests
how the kernel behaves with invalid addresses. But it happened very
rarely in the dcache hash too. But still it's hard to trigger, the
linked list one is very hard to hit. I tried to reproduce it in user space,
but failed. The LTP one is much easier, but still not that common.
-Andi
next prev parent reply other threads:[~2003-08-13 15:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030813045638.GA9713@middle.of.nowhere.suse.lists.linux.kernel>
[not found] ` <20030813014746.412660ae.akpm@osdl.org.suse.lists.linux.kernel>
[not found] ` <20030813091958.GA30746@gates.of.nowhere.suse.lists.linux.kernel>
[not found] ` <20030813025542.32429718.akpm@osdl.org.suse.lists.linux.kernel>
[not found] ` <1060772769.8009.4.camel@localhost.localdomain.suse.lists.linux.kernel>
2003-08-13 11:17 ` Andi Kleen
[not found] ` <20030813042544.5064b3f4.akpm@osdl.org.suse.lists.linux.kernel>
[not found] ` <1060774803.8008.24.camel@localhost.localdomain.suse.lists.linux.kernel>
2003-08-13 12:10 ` Andi Kleen
2003-08-13 12:48 ` Alan Cox
2003-08-13 13:14 ` Andi Kleen
2003-08-13 14:09 ` Alan Cox
2003-08-13 14:20 ` Andi Kleen
2003-08-13 15:20 ` Alan Cox
2003-08-13 15:32 ` Andi Kleen [this message]
2003-08-13 18:44 ` Alan Cox
2003-08-13 18:53 ` Andi Kleen
2003-08-13 16:39 ` Dave Jones
2003-08-13 18:34 ` Alan Cox
2003-08-13 20:12 ` Dave Jones
2003-08-13 18:37 ` Alan Cox
2003-08-13 18:59 richard.brunner
-- strict thread matches above, loose matches on Subject: below --
2003-08-13 4:56 Jurriaan
2003-08-13 8:47 ` Andrew Morton
2003-08-13 9:19 ` Jurriaan on adsl-gate
2003-08-13 9:55 ` Andrew Morton
2003-08-13 11:06 ` Alan Cox
2003-08-13 11:25 ` Andrew Morton
2003-08-13 11:40 ` Alan Cox
2003-08-18 12:08 ` Pavel Machek
2003-08-13 11:06 ` 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=20030813153235.GB21081@wotan.suse.de \
--to=ak@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®