[lkml]   [2003]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [SisopIII-l] Re: [PATCH] fix #endif misplacement
    On Friday 28 November 2003 19:35, Ricardo Nabinger Sanchez wrote:
    > Quoting Tim Schmielau <>
    > Sent on Fri, 28 Nov 2003 17:34:49 +0100 (CET)
    > > > This patch fixes an #endif misplacement, which leads to dead code in
    > > > sched_clock() in arch/i386/kernel/timers/timer_tsc.c, due to a return
    > > > outside the ifdef/endif.
    > >
    > > No, this is exactly what is intended: don't use the TSC on NUMA, use
    > > jiffies instead.
    > > Look at the comment just above those lines.
    > I'm breaking things. Sorry.
    > I think I understood it now: the #ifndef protects only the check for TSC
    > availability on non-NUMA archs. If it's available, and not under NUMA (so
    > the ifndef), use it (jump to the rdtscll()), otherwise return the
    > expression result.
    > The strange thing to me is that I'm getting 1/10 of the expected value when
    > measuring tasks timeslices. Instead of getting ~100ms for tasks which just
    > burn CPU, I'm getting 10ms.
    > I measure timeslices inside schedule(), updating the average timeslice for
    > the leaving process, using (now - prev->timestamp).
    > Any clue of what am I doing wrong?


    It could it be possible that TSC isn't being enabled on your processor due to
    a buggy TSC. You can try to trace the code on init_tsc(), in
    arch/i386/kernel/timers/timer_tsc.c to realize what's going on.

    You can also try to check whether you're using HPET or not (when enabled and
    supported it makes use of TSC) in your .config . In the case you're not using
    it, the code that calibrates and dictates how to deal with the stamp counter
    is calibrate_tsc(), in arch/i386/kernel/timers/common.c.

    Hope this helps,
    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-03-22 13:59    [W:0.021 / U:18.884 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site