[lkml]   [2000]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Slow pthread_create() under high load

    On 28-Mar-00 Stephen C. Tweedie wrote:
    > No. That's the whole point: we have per-task credentials. If we
    > went instead to have per-process credentials, with credentials shared
    > amongst all tasks, then every syscall which uses permissions would
    > have to lock the credentials structure while it is running, or risk
    > having credentials changing in the middle of a syscall. That's why
    > CLONE_CREDENTIALS would have to add a bucket of extra, slow, locking
    > all over the kernel. No thanks, if it can be done in user space
    > (which it can, albeit not very efficiently when we do a process-wide
    > setreuid).

    Another way of dealing with this is to have local copies of the credentials in
    each task, as well as the shared credentials, each with change counter. At
    entry to each syscall which cares, the task can check to see if its creds are
    up to date and copy them from the shared creds if not. It's not wildly clean,
    but it is one of those cases where copying rather than sharing can simplify
    locking a lot.

    I guess you could do it in the library too, if you make each syscall wrapper
    check the thread credential validity before entering the kernel.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:57    [W:0.036 / U:12.100 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site