[lkml]   [2008]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: pthread_create() slow for many threads; also time to revisit 64b context switch optimization?
    Ingo Molnar wrote:
    > As unimplemented flags just get ignored by the kernel, if this flag goes
    > into v2.6.27 as-is and is ignored by the kernel (i.e. we just use a
    > plain old 64-bit [47-bit] allocation), then you could do the glibc
    > change straight away, correct? So then if people complain we can fix it
    > in the kernel purely.
    > how about this then?

    > +#define MAP_64BIT_STACK 0x20000 /* give out 32bit addresses on old CPUs */

    I think the flag makes sense but it's name is confusing - 64BIT for a
    flag which means "maybe request 32-bit stack"! Suggest:

    +#define MAP_STACK 0x20000 /* 31bit or 64bit address for stack, */
    + /* whichever is faster on this CPU */

    Also, is this _only_ useful for thread stacks, or are there other
    memory allocations where 31-bitness affects execution speed on old P4s?

    -- Jamie

     \ /
      Last update: 2008-08-15 17:59    [W:0.018 / U:12.980 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site