linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andi Kleen <ak@suse.de>, Nick Piggin <nickpiggin@yahoo.com.au>,
	Linux Memory Management <linux-mm@kvack.org>,
	Hugh Dickins <hugh@veritas.com>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 10/10] alternate 4-level page tables patches
Date: Mon, 20 Dec 2004 19:19:30 +0100	[thread overview]
Message-ID: <20041220181930.GH4316@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0412201000340.4112@ppc970.osdl.org>

On Mon, Dec 20, 2004 at 10:08:29AM -0800, Linus Torvalds wrote:
> 
> 
> On Mon, 20 Dec 2004, Andi Kleen wrote:
> > > 
> > > Because it used to be broken as hell. The code it generated was absolute 
> > > and utter crap.
> > 
> > I disagree. It generated significantly smaller code and the SUSE 
> > kernel has been shipping with it for several releases and I'm not
> > aware of any bug report related to unit-at-a-time.
> 
> You didn't answer my question: have you checked anything but your recent 
> version of gcc?

I have experience with 3.3-hammer (from SUSE kernel releases) and exact
data from a 4.0 snapshot (as posted) 

> 
> The fact is, there _were_ lots of complaints about unit-at-a-time. There 

I remember there was one, but they took a brute-force sledgehammer fix.
The right fix would have been to add the noinlines, not penalize
everybody.


> was a reason that thing got disabled. Maybe they got fixed, BUT THAT 
> DOESN'T HELP, if people are still using the old compilers that support 
> the notion, but do crap for it.

It helps when you add the noinlines. I can do that later - search
for Arjan's old report (I think he reported it), check what compiler
version he used, compile everything with it and unit-at-a-time
and eyeball all the big stack frames and add noinline
if it should be really needed.

> 
> We still support gcc-2.95. By implication, that pretty much means that we 
> support all the early unit-at-a-time compilers too. Not just the 
> potentially fixed ones.

The only widely used compilers with unit-at-a-time are 3.3-hammer (actually
several iterations since it has changed a bit over time) and
3.4 

> Thus your "it works for SuSE" argument is totally pointless, and totally 
> misses the issue.

Well, it's possible that there is a problem in 3.4 that isn't in
3.3-hammer (that is what suse uses), but if yes it should 
be easy to workaround with a few noinlines.

> 
> > The right fix in that case would have been to add a few "noinline"s
> > to these cases (should be easy to check for if it really happens 
> > by grepping assembly code for large stack frames), not penalize code quality
> > of the whole kernel.
> 
> No. The right fix is _always_ to make sure that we are conservative enough 
> that we don't have to depend on getting compiler-specific details really 
> really right. 
> 
> The thing is, performance (even when unit-at-a-time works) comes second to 
> stability. And I don't say that as a user (although it's obviously true 
> for users too), I say that as a _developer_. The amount of effort needed 
> to chase down strange problem reports due to compiler issues is just not 
> worth it.

I agree in the general case, but at least for stack consumption stuff
I don't. Since we have so much code it's pretty much required that
someone does the regular objdump -S ... | grep sub.*esp check
and verifies that nobody added more stack pigs. As the data in my
last mail has shown this is pretty much required. And when there
is a unit-at-a-time problem it can be quickly caught this way.

And I fixed quite a lot of stack consumption bugs over the years, but
none of them was caused by unit-a-a-time.

BTW what I heard from gcc people is that they plan to make unit-at-a-time
mandatory in some future version, so eventually we have to deal with
it anyways.

And I had it always enabled on x86-64 since the beginning and there
was so far not a *single* bug report related to it. 

> I would suggest that if you want unit-at-a-time, you make it a config 
> option, and you mark it very clearly as requiring a new enough compiler 
> that it's worth it and stable. That way if people have problems, we can 
> ask them "did you have unit-at-a-time enabled?" and see if the problem 
> goes away.

If you really suspect unit-at-a-time better just grep the stack frames.
And we already have too many such dumb options, like the totally useless
option to change all the code alignments in the config (I bet 99% of
all users will get it wrong). At least I will not add more of them.

-Andi

--
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:"aart@kvack.org"> aart@kvack.org </a>

  parent reply	other threads:[~2004-12-20 18:19 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-18  6:55 [RFC][PATCH 0/10] " Nick Piggin
2004-12-18  6:55 ` [PATCH 1/10] " Nick Piggin
2004-12-18  6:56   ` [PATCH 2/10] " Nick Piggin
2004-12-18  6:56     ` [PATCH 3/10] " Nick Piggin
2004-12-18  6:57       ` [PATCH 4/10] " Nick Piggin
2004-12-18  6:58         ` [PATCH 5/10] " Nick Piggin
2004-12-18  6:58           ` [PATCH 6/10] " Nick Piggin
2004-12-18  6:59             ` [PATCH 7/10] " Nick Piggin
2004-12-18  7:00               ` [PATCH 8/10] " Nick Piggin
2004-12-18  7:00                 ` [PATCH 9/10] " Nick Piggin
2004-12-18  7:01                   ` [PATCH 10/10] " Nick Piggin
2004-12-18  7:31                     ` Andi Kleen
2004-12-18  7:46                       ` Nick Piggin
2004-12-18  8:08                       ` Andrew Morton
2004-12-18  9:48                         ` Andi Kleen
2004-12-18 19:06                       ` Linus Torvalds
2004-12-20 17:43                         ` Andi Kleen
2004-12-20 17:47                           ` Randy.Dunlap
2004-12-20 18:08                           ` Linus Torvalds
2004-12-20 18:15                             ` Linus Torvalds
2004-12-20 18:19                             ` Andi Kleen [this message]
2004-12-20 18:47                               ` Linus Torvalds
2004-12-20 18:52                                 ` Linus Torvalds
2004-12-20 18:59                                 ` Andi Kleen
2004-12-20 18:57                                   ` Randy.Dunlap
2004-12-18  9:05         ` [PATCH 4/10] " Nick Piggin
2004-12-18  9:50           ` Andi Kleen
2004-12-18 10:06             ` Nick Piggin
2004-12-18 10:11               ` Andi Kleen
2004-12-18 10:22               ` Nick Piggin
2004-12-18 10:29                 ` Nick Piggin
2004-12-18 11:06               ` William Lee Irwin III
2004-12-18 11:17                 ` Nick Piggin
2004-12-18 11:32                   ` William Lee Irwin III
2004-12-18 11:55                     ` Nick Piggin
2004-12-18 12:46                       ` William Lee Irwin III
2004-12-18 12:48                         ` William Lee Irwin III
2004-12-19  0:05                         ` Nick Piggin
2004-12-19  0:20                           ` William Lee Irwin III
2004-12-19  0:38                             ` Nick Piggin
2004-12-19  1:01                               ` William Lee Irwin III
2004-12-19  1:31                             ` Linus Torvalds
2004-12-19  2:08                               ` William Lee Irwin III
2004-12-19  2:26                                 ` Nick Piggin
2004-12-19  5:23                                 ` Linus Torvalds
2004-12-19  6:02                                   ` William Lee Irwin III
2004-12-19 18:17                                     ` Linus Torvalds
2004-12-20  1:00                                       ` William Lee Irwin III
2004-12-18 10:45         ` William Lee Irwin III
2004-12-18 10:58           ` Nick Piggin
2004-12-19  0:07 ` [RFC][PATCH 0/10] " Hugh Dickins
2004-12-19  0:33   ` Nick Piggin
2004-12-20 18:04   ` Andi Kleen
2004-12-20 18:40     ` Linus Torvalds
2004-12-20 18:53       ` Andi Kleen
2004-12-21  0:04         ` Linus Torvalds
2004-12-21  0:22           ` Andi Kleen
2004-12-21  0:43             ` Linus Torvalds
2004-12-21  0:47             ` Nick Piggin
2004-12-21  2:55               ` Hugh Dickins
2004-12-21  3:21                 ` Nick Piggin
2004-12-21  3:47                 ` Linus Torvalds
2004-12-21  3:56                   ` Linus Torvalds
2004-12-21  4:04                     ` Nick Piggin
2004-12-21  4:08                       ` Nick Piggin
2004-12-21  9:36                     ` Andi Kleen
2004-12-21 10:13                       ` Hugh Dickins
2004-12-21 10:59                       ` Nick Piggin
2004-12-21 17:36                       ` Linus Torvalds
2004-12-21 20:19                         ` Andi Kleen
2004-12-21 23:49                           ` Nick Piggin
2004-12-22 10:38                             ` Andi Kleen
2004-12-22 11:19                               ` Nick Piggin
2004-12-22 11:23                                 ` Nick Piggin
2004-12-22 18:07                                 ` Andi Kleen
2004-12-30 21:24                                   ` Nick Piggin
2004-12-21 10:52                     ` Nick Piggin

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=20041220181930.GH4316@wotan.suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    --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