netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Mitchell Blank Jr <mitch@sfgoth.com>
Cc: netdev@oss.sgi.com
Subject: Re: do_gettimeofday
Date: Fri, 3 Oct 2003 01:27:54 -0700	[thread overview]
Message-ID: <20031003012754.23de3f66.davem@redhat.com> (raw)
In-Reply-To: <20031003082642.GF42593@gaz.sfgoth.com>

On Fri, 3 Oct 2003 01:26:42 -0700
Mitchell Blank Jr <mitch@sfgoth.com> wrote:

> Are there any common cases where skb->stamp is looked at more than
> once?

Yes, the packet scheduler can cause this to happen.

>If so I might recommend changing the API to be more like:
> 
> 	const struct timeval *skb_timestamp(struct skbuff *skb);

Please no, making this a SKB or networking specific interface
make it nearly valueless and we might as well just stay with the
stuff we have.


> > Platforms with inter-cpu TSC synchronization issues will have some
> > troubles doing the same trick too, because one must handle properly
> > the case where the fast timestamp is converted to a timeval on a different
> > cpu on which the fast timestamp was recorded.
> 
> Yeah, you'd probably have something like

Doesn't work as-is.  You'd have to not only store the timestamp and
the cpu it was stored on, but also cross-call to that cpu to compute
the correct timeval.  That's really expensive and probably
do_gettimeofday() is going to be faster in the long run compared to
such a scheme.

  reply	other threads:[~2003-10-03  8:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-02 18:32 do_gettimeofday Steve Modica
2003-10-02 19:29 ` do_gettimeofday Andi Kleen
2003-10-02 19:56 ` do_gettimeofday Stephen Hemminger
2003-10-02 20:46   ` do_gettimeofday Mitchell Blank Jr
2003-10-03  7:41   ` do_gettimeofday David S. Miller
2003-10-03  8:26     ` do_gettimeofday Mitchell Blank Jr
2003-10-03  8:27       ` David S. Miller [this message]
2003-10-03  8:48         ` do_gettimeofday Mitchell Blank Jr
2003-10-03  8:52           ` do_gettimeofday David S. Miller
2003-10-03  9:26             ` do_gettimeofday Mitchell Blank Jr
2003-10-03  9:23               ` do_gettimeofday David S. Miller
2003-10-03 16:42               ` do_gettimeofday Ben Greear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031003012754.23de3f66.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=mitch@sfgoth.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).