lkml.org 
[lkml]   [2002]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: hires timestamps for netif_rx()
    Taking linux-net out of the distribution.

    On Wed, 16 Jan 2002, David S. Miller wrote:

    > From: Wilson Yeung <wilson@whack.org>
    > Date: Wed, 16 Jan 2002 17:03:58 -0800 (PST)
    >
    > The discreprency is that get_fast_time() returns the current value of
    > xtime, while do_gettimeofday() may actually calculate the time and
    > consider both xtime and the jiffies.
    >
    > Look at the x86 implementation of do_fast_time, it equals
    > do_gettimeofday() when TSC is present which is the only time
    > that do_gettimeofday is going to be more accurate than xtime.

    That's interesting, because when I call do_gettimeofday() instead of
    get_fast_time(), I get different kinds of results that imply that these
    are not equivalent. I'm running the kernel on a PIII.

    I'm looking at arch/i386/kernel/time.c, and I see the definition
    you're talking about. I'm also looking at kernel/time.c, and I'm not sure
    how these things are interacting yet.

    Anyway...

    I did a ping flood from a host on the LAN, and ran tcpdump.

    Here is a sequence of timestamps when netif_rx() uses do_gettimeofday()
    directly:

    18:26:01.658704
    18:26:01.658844
    18:26:01.658851
    18:26:01.658992
    18:26:01.658998

    Here is a sequence of timestamps when netif_rx() uses get_fast_time():

    18:40:17.614165
    18:40:17.614165
    18:40:17.614165
    18:40:17.614165
    18:40:17.614165

    Notice that all the timestamps are the same, which led me to believe that
    xtime was being gotten directly.

    But if they're defined to be the same, then my call to do_gettimeofday()
    should have gotten similar results.

    Wilson

    -
    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: 2005-03-22 13:18    [W:0.026 / U:149.280 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site