public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "dada1" <dada1@cosmosbay.com>
To: "Andi Kleen" <ak@colin2.muc.de>
Cc: "Nakajima, Jun" <jun.nakajima@intel.com>,
	"Andi Kleen" <ak@muc.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata
Date: Thu, 11 Sep 2003 07:58:46 +0200	[thread overview]
Message-ID: <0a7701c37829$c4bdef40$890010ac@edumazet> (raw)
In-Reply-To: 20030911051121.GA7751@colin2.muc.de


>
> I don't have any. But it would be very similar to the in kernel checking
> code (see the is_prefetch function in my patches). Just you feed it
> the fields from sigcontext in the signal handler and replace __get_user
> with a normal memory access.

OK will try... but how test it... sounds not easy.

> > I do use preftechnta instructions on my programs, and this errata could
> > explain some strange crashes.
>
> The bogus faults are very easy to diagnose. When you have a core dump
> and disassemble the faulting instruction (in gdb x/i $eip) and it is
> a prefetch (prefetch/prefetchw/prefetchnt*) then it could be that.

Well, the program is using more than 2Go ram... the core is not written to
disk as the machine hangs just *after*

And this is a remote machine in a Datacenter.

>
> If it is a different instruction it is unrelated.
>
> It would also only happen when you prefetch ever on unmapped addresses.

NULL for example ?

Typical example of code ;

T_cell *ptr, *next ;
for (ptr = list.head ; ptr != NULL ; ptr = next) {
   next = ptr->next ;
   prefetch(next) ;
   some_work(ptr) ;
   }

I may replace NULL by &FakeMappedData   (allways present in memory)

>
> That sounds like an unrelated issue.
>
> When user space crashes on this the kernel is unaffected.

This is not a kernel crash. But total freeze as all memory is used by
network buffers, in no more than 10 seconds.
This application receive smalls TCP messages (about 30 bytes), but the
network stacks allocates 4KB buffers to store this little messages.

No oops, but what can we do, if the freeze lasts eternity ?

I posted a test application some days ago about this problem and got no
answers/feedback.

>
> In case the 2.6 kernel crashes on this (2.4 does not trigger it)
> then you can also run the oops through ksymoops and check if the
> faulting instruction is prefetch. If it isn't  then it is something else.
>
> Network buffers using up all of low mem and then crash
> is likely some OOM handling problem. If you're on 2.4 try an -aa kernel,
> they handle this much better than the marcelo tree. If it's 2.6 then
> I would recommend posting oopses on this list, maybe someone can fix
> it. I suspect 2.6's OOM handling could be still improved.
>
> -Andi
> -

Eric


  reply	other threads:[~2003-09-11  5:59 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <uqD5.3BI.3@gated-at.bofh.it>
2003-09-11  4:14 ` [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata Andi Kleen
2003-09-11  4:58   ` dada1
2003-09-11  5:11     ` Andi Kleen
2003-09-11  5:58       ` dada1 [this message]
2003-09-11 12:09         ` Network buffer hang was " Andi Kleen
2003-09-11 13:17           ` dada1
2003-09-12  1:46             ` Ben Greear
2003-09-12  1:41               ` David S. Miller
2003-09-16  2:23 richard.brunner
  -- strict thread matches above, loose matches on Subject: below --
2003-09-15 20:20 Nakajima, Jun
2003-09-15 20:03 Nakajima, Jun
2003-09-15 19:51 richard.brunner
2003-09-16  0:01 ` David Lang
2003-09-16  0:20 ` Bill Davidsen
2003-09-16 11:50 ` Jamie Lokier
2003-09-16 13:46   ` Bill Davidsen
2003-09-16 17:21     ` Jamie Lokier
2003-09-15 19:34 John Bradford
2003-09-15 19:25 ` Bill Davidsen
2003-09-15 22:28 ` Alan Cox
2003-09-15 19:19 John Bradford
     [not found] <200309150632.h8F6WnHb000589@81-2-122-30.bradfords.org.uk.suse.lists.linux.kernel>
     [not found] ` <1063611650.2674.1.camel@dhcp23.swansea.linux.org.uk.suse.lists.linux.kernel>
2003-09-15 18:29   ` Andi Kleen
2003-09-15 16:21 richard.brunner
2003-09-15 19:15 ` Bill Davidsen
2003-09-16 11:46 ` Jamie Lokier
2003-09-16 13:30   ` Dave Jones
2003-09-16 13:52     ` Bill Davidsen
2003-09-16 15:25       ` Timothy Miller
2003-09-16 16:53         ` Bill Davidsen
2003-09-16 17:22         ` Jamie Lokier
2003-09-16 17:23       ` Jamie Lokier
2003-09-18  7:43 ` Pavel Machek
2003-09-18 14:05   ` Dave Jones
2003-09-18 15:56     ` Jamie Lokier
2003-09-18 17:34   ` Bill Davidsen
2003-09-15 14:21 John Bradford
2003-09-15 12:43 John Bradford
2003-09-15 18:21 ` Bill Davidsen
2003-09-15 12:28 Mikael Pettersson
2003-09-15 18:13 ` Bill Davidsen
2003-09-16 11:54 ` Jamie Lokier
2003-09-15 11:46 John Bradford
2003-09-15 12:38 ` Nick Piggin
2003-09-15 13:46   ` Chris Meadors
2003-09-15 14:00     ` Nick Piggin
2003-09-16 15:06   ` Bill Davidsen
2003-09-16 15:24     ` Nick Piggin
2003-09-15 10:54 John Bradford
2003-09-15 10:52 ` Nick Piggin
2003-09-15 13:45 ` Alan Cox
2003-09-15 18:44   ` Bill Davidsen
2003-09-15  9:39 John Bradford
2003-09-15  9:58 ` Nick Piggin
2003-09-15  8:31 John Bradford
2003-09-15  8:32 ` Nick Piggin
2003-09-15 20:51   ` Adrian Bunk
2003-09-15  6:32 John Bradford
2003-09-15  7:40 ` Alan Cox
2003-09-15 12:02   ` Bill Davidsen
2003-09-15 11:48 ` Bill Davidsen
2003-09-15 20:55 ` Adrian Bunk
2003-09-16  0:26   ` Bill Davidsen
2003-09-12 21:24 John Bradford
2003-09-11 17:17 richard.brunner
2003-09-13 16:54 ` Pavel Machek
2003-09-11 17:14 richard.brunner
2003-09-11 17:09 richard.brunner
2003-09-11  4:55 richard.brunner
2003-09-11 16:55 ` Jamie Lokier
2003-09-12 14:14 ` Martin Schlemmer
2003-09-11  3:43 Nakajima, Jun
2003-09-11  4:03 ` Valdis.Kletnieks
2003-09-11  0:56 Update on AMD Athlon/Opteron/Athlon64 Prefetch Errata richard.brunner
2003-09-11  1:27 ` [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata Andi Kleen
2003-09-11  1:44   ` Andrew Morton
2003-09-11  1:47     ` Andi Kleen
2003-09-11 14:15       ` Jeff Garzik
2003-09-11 14:26         ` Andi Kleen
2003-09-11 14:34           ` Jeff Garzik
2003-09-11 14:58             ` Andi Kleen
2003-09-11 15:06               ` Jeff Garzik
2003-09-11 20:08               ` bill davidsen
2003-09-11 19:56             ` bill davidsen
2003-09-11 20:44               ` Alan Cox
2003-09-11 21:29                 ` Mike Fedyk
2003-09-11 21:38                 ` bill davidsen
2003-09-12 17:32             ` Eric W. Biederman
2003-09-12 17:56               ` Andi Kleen
2003-09-12 17:59                 ` Jeff Garzik
2003-09-12 18:22                   ` Adrian Bunk
2003-09-12 18:28                     ` Andi Kleen
2003-09-12 18:39                       ` Jeff Garzik
2003-09-12 18:45                       ` Jeff Garzik
2003-09-12 18:48                       ` Adrian Bunk
2003-09-12 19:07                         ` Andi Kleen
2003-09-12 19:05                       ` Martin Schlemmer
2003-09-12 19:30                         ` Andi Kleen
2003-09-12 19:58                           ` Martin Schlemmer
2003-09-12 20:00                           ` Adrian Bunk
2003-09-15  0:15                           ` bill davidsen
2003-09-14 23:51                       ` bill davidsen
2003-09-14 23:49                     ` bill davidsen
2003-09-14 23:47                 ` bill davidsen
2003-09-15  1:02                   ` Zwane Mwaikambo
2003-09-15  2:08                     ` Nick Piggin
2003-09-15  3:55                     ` Bill Davidsen
2003-09-15  7:45                       ` Alan Cox
2003-09-15 12:11                         ` Bill Davidsen
2003-09-15 13:48                           ` Alan Cox
2003-09-15 18:50                             ` Bill Davidsen
2003-09-12 18:03               ` Mike Fedyk
2003-09-11 13:54   ` Linus Torvalds
2003-09-11 14:01     ` Andi Kleen
2003-09-11 14:14       ` Dave Jones
2003-09-11 14:29         ` Andi Kleen
2003-09-11 14:14     ` Alan Cox
2003-09-11 14:24       ` Andi Kleen
2003-09-11 14:28         ` Dave Jones
2003-09-11 14:32           ` Andi Kleen
2003-09-11 20:14         ` bill davidsen
2003-09-11 16:58   ` Jamie Lokier
2003-09-11 17:05     ` Andi Kleen
2003-09-11 17:32       ` Jamie Lokier
2003-09-11 17:39         ` Andi Kleen
2003-09-11 17:48           ` Jamie Lokier
2003-09-11 18:18             ` Andi Kleen
2003-09-11 18:59               ` Jamie Lokier

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='0a7701c37829$c4bdef40$890010ac@edumazet' \
    --to=dada1@cosmosbay.com \
    --cc=ak@colin2.muc.de \
    --cc=ak@muc.de \
    --cc=jun.nakajima@intel.com \
    --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