Re: [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected



Linus Torvalds wrote:
The inline-functions-called-once thing is what causes even big functions
to be inlined, and that's where you find the big downsides too (eg the
stack usage).

That's a bit bizarre, though, isn't it?

A function which is only called from one place should, if everything
made sense, _never_ use more stack through being inlined. Inlining
should just increase the opportunities that the called function's
local variables can share the same stack slots are the caller's dead
locals.

Whereas not inlining guarantees they occupy separate, immediately
adjacent regions of the stack, and shouldn't be increasing the total
numbers of local variables.

-- Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Local variables controversial?
    ... >>>Calforth uses local variables, but doesn't set a policy of what's good ... they are implemented using a stack frame. ... is still on the Forth data stack? ...
    (comp.lang.forth)
  • Re: Local variables controversial?
    ... Calforth uses local variables, but doesn't set a policy of what's good ... of simply popping the old stack pointer off the stack frame and ... Do I understand you right to mean that the actual data in the stack frame is still on the Forth data stack? ...
    (comp.lang.forth)
  • Re: Buffer overflow prevention
    ... > I have an idea on buffer overflow prevention. ... > the fact that we're using the stack, referenced by SS:ESP pair, both ... > procedure return address and for local variables. ... if we use first segment for passing variables ...
    (Bugtraq)
  • Re: Local variables controversial?
    ... >> you keep them on the stack the stack is minimally 4 deep, ... >Graphics always comes up when locals are discussed. ... I can summarize my ... >that don't ever require substandial stack thrashing OR local variables. ...
    (comp.lang.forth)
  • Re: Patching
    ... >That's what we call an execution vector. ... >is relatively common practice. ... >Common terminology in Forth is to call stack items "stack ... "Local variables" are items delivered to a word on the ...
    (comp.lang.forth)