[lkml]   [2005]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Optimize sys_times for a single thread process
    On Tue, 17 May 2005, Andrew Morton wrote:

    > Well, hrm, maybe. If this task has one sibling thread, and that thread is
    > in the process of exitting then (current == next_thread(current)) may
    > become true before that sibling thread has had a chance to dump its process
    > accounting info into the signal structure.

    The task is only "unhashed" after the counters have been added in
    __exit_signal. See release_task in kernel/exit.c

    > If that dumping happens prior to the __detach_pid() call then things are
    > probably OK (modulo memory ordering issues). Otherwise there's a little
    > window where the accounting will go wrong.

    __exit_signal takes various locks that will insure the proper sequencing.

    > Have you audited that code to ensure that the desired sequencing occurs in
    > all cases and that the appropriate barriers are in place?

    AFAIK release task is always called for task removal.

    > It all looks a bit fast-and-loose. If there are significant performance
    > benefits and these issues are loudly commented (they aren't at present)
    > then maybe-OK, I guess.

    There are significant performance benefits in particular for one standard
    NUMA benchmark that keeps calling sys_times over and over. I believe other
    programs may exhibit the same brain dead behavior.

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

     \ /
      Last update: 2005-05-18 02:18    [W:0.027 / U:14.552 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site