lkml.org 
[lkml]   [1998]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: How much kernel stack do we need?
    On Fri, 19 Jun 1998, Bernd Schmidt wrote:

    > In 2.1.x kernels, the kernel stack size is 8192 bytes (2 pages) on the i386,
    > minus the size of the task structure (around 1000). This means the stack is
    > more than 3000 bytes larger than in 2.0.x where it used to be one page. My
    > question is: do we really need this?

    This is a _very_ good question, since it could save us one
    unswappable page _per process_. This might not seem like
    an awful lot of memory, but with the current fragmentation
    problems this patch could save our butt...
    (at least until the zone allocator is ready)

    [snip measurements]
    > that allocate a 2000 byte array on the stack. Does anyone else think it
    > would be worthwhile to fix those and reduce the kernel stack size again?

    Absolutely. Just think about someone running 60 processes
    on a 4MB machine. This person is now wasting 60 * 4k =
    240kB of _unswappable_ memory. That is 1/16th of total
    memory, which can be very taxing on your router/mailserver.

    > I have a patch that makes the stack size configurable (I've even tested it...)
    > which I could provide if someone is interested.

    I am _very_ interested. I'll put it on the Linux MM
    (http://www.phys.uu.nl/~riel/mm-patch/) immediately!

    Rik.
    +-------------------------------------------------------------------+
    | Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
    | Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
    +-------------------------------------------------------------------+


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu

    \
     
     \ /
      Last update: 2005-03-22 13:43    [W:0.039 / U:0.132 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site