linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Tony Lill <ajlill@ajlc.waterloo.on.ca>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, bugzilla-daemon@bugzilla.kernel.org,
	bugme-daemon@bugzilla.kernel.org,
	Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [Bugme-new] [Bug 15214] New: Oops at __rmqueue+0x51/0x2b3
Date: Thu, 11 Feb 2010 10:49:44 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1002111038070.7792@localhost.localdomain> (raw)
In-Reply-To: <20100211182031.GA5707@csn.ul.ie>



On Thu, 11 Feb 2010, Mel Gorman wrote:
> 
> Tony posted the assember files (KCFLAGS=-save-temps) from
> the broken and working compilers which a copy of is available at
> http://www.csn.ul.ie/~mel/postings/bug-20100211/ . Have you any suggestions
> on what the best way to go about finding where the badly generated code
> might be so a warning can be added for gcc 4.1?  My strongest suspicion is
> that the problem is in the assembler that looks up the struct page from a
> PFN in sparsemem but I'm failing to prove it.

Try contacting the gcc people. They are (well, _some_ of them are) much 
more used to walking through asm differences, and may have more of a clue 
about where the difference is likely to be for those compiler versions.

I'm personally very comfortable with x86 assembly, but having tried to 
find compiler bugs in the past I can also say that despite my x86 comfort 
I've almost always failed. The trivial stupid differences tend to always 
just totally overwhelm the actual real difference that causes the bug.

One thing to try is to see if the buggy compiler version can be itself 
triggered to create a non-buggy asm listing by using some compiler flag. 
That way the "trivial differences" tend to be smaller, and the bug stands 
out more.

For example, that's how we found the problem with "-fwrapv" - testing the 
same compiler version with different flags (see commit a137802ee83).

Sometimes if the trivial differences are mostly register allocation, you 
can get a "feel" for the differences by replacing all register names with 
just the string "REG" (and "[0-9x](%e[sb]p)" with "STACKSLOT", and try to 
do the diff that way. If everything else is roughly the same, you then see 
the place where the code is _really_ different.

But when the compiler actually re-orders basic blocks etc, then diffs are 
basically impossible to get anything sane out of.

		Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-02-11 18:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-15214-10286@http.bugzilla.kernel.org/>
2010-02-03 22:39 ` Andrew Morton
2010-02-05 11:20   ` Mel Gorman
2010-02-07 18:34     ` Tony Lill
2010-02-08 10:10       ` Mel Gorman
2010-02-08 19:18         ` Andrew Morton
2010-02-09 14:45           ` Mel Gorman
     [not found]             ` <201002101217.34131.ajlill@ajlc.waterloo.on.ca>
2010-02-11 18:20               ` Mel Gorman
2010-02-11 18:49                 ` Linus Torvalds [this message]
2010-02-12 12:17                   ` Mel Gorman

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=alpine.LFD.2.00.1002111038070.7792@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=ajlill@ajlc.waterloo.on.ca \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=bugzilla-daemon@bugzilla.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    /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