[lkml]   [2008]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: x86: 4kstacks default
    Denys Vlasenko <> writes:
    > Forget about 50k threads. 4k of waste per process is a waste nevertheless.
    > It's not at all unusual to have 250+ processes, and 250 processes with 8k
    > stack each waste 1M. Do you think extra 1M won't be useful to have?

    If the 1M gives you more reliability (and I think it does) I don't
    think it is "wasted". Would you trade occasional crashes for 1MB?
    I wouldn't.

    Also a typical process uses much more memory than just 4K. If it's
    not a thread it needs own page tables and from those alone you're
    easily into 10+ pages even for a quite small process. But even threads
    in practice have other overheads too if they actually do something.
    The 4K won't save or break you.

    [BTW if you're really interested in saving memory there are lots
    of other subsystems where you could very likely save more. A common
    example are the standard hash tables which are still too big]

    The trends are also against it: kernel code is getting more and more
    complex all the time with more and more complicated stacks of
    different subsystems on top of each other. It wouldn't surprise me if
    at some point 8KB isn't even enough anymore. Going into the
    other direction is definitely the wrong way.


     \ /
      Last update: 2008-04-21 11:57    [W:0.024 / U:3.208 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site