lkml.org 
[lkml]   [2014]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [RFC 2/2] x86_64: expand kernel stack to 16K
    From
    On Wed, May 28, 2014 at 8:46 PM, Minchan Kim <minchan@kernel.org> wrote:
    >
    > Yes. For example, with mark __alloc_pages_slowpath noinline_for_stack,
    > we can reduce 176byte.

    Well, but it will then call that __alloc_pages_slowpath() function,
    which has a 176-byte stack frame.. Plus the call frame.

    Now, that only triggers for when the initial "__GFP_HARDWALL" case
    fails, but that's exactly what happens when we do need to do direct
    reclaim.

    That said, I *have* seen cases where the gcc spill code got really
    confused, and simplifying the function (by not inlining excessively)
    actually causes a truly smaller stack overall, despite the actual call
    frames etc. But I think the gcc people fixed the kinds of things that
    caused *that* kind of stack slot explosion.

    And avoiding inlining can end up resulting in less stack, if the
    really deep parts don't happen to go through that function that got
    inlined (ie any call chain that wouldn't have gone through that
    "slowpath" function at all).

    But in this case, __alloc_pages_slowpath() is where we end up doing
    the actual direct reclaim anyway, so just uninlining doesn't actually
    help. Although it would probably make the asm code more readable ;)

    Linus


    \
     
     \ /
      Last update: 2014-05-29 07:41    [W:4.609 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site