lkml.org 
[lkml]   [2007]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] [15/58] i386: Rewrite sched_clock
    Date

    > So if, after this, we run tsc_sched_clock() with an unstable TSC, we
    > read a last_val containing the interrupt's MSB and the last_val LSB. It
    > can particularity hurt if we are around a 32 bits overflow, because time
    > could "jump" forward of about 1.43 seconds on a 3 GHz system.
    >
    > So I guess we need synchronization on the fast path, and therefore using
    > cmpxchg_local on x86_64

    On x86-64 the 64bit write is atomic against interrupts.

    You're right 32bit has a problem though. I'm not too happy about
    cmpxchg though because that wouldn't work on some CPUs.

    I wonder if we can just get away with using a 32bit value on i386.
    Just for the purpose of keeping the value monotonic it should be good
    enough. Will think about it.

    Thanks for the review.

    -Andi

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-07-20 17:23    [W:2.249 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site