Subject: Re: Route cache performance under stress

From: Ben Greear <[email-masked]>
Date: Tue, 10 Jun 2003 18:51:17 -0700

David S. Miller wrote:

>    Do we know when we are being asked for this value?
> 
> We have to take the timestamp at netif_receive_skb() for it to
> be accurate.
> 
> We don't even know if this packet is for this host until a long
> time later, let alone whether any local sockets want SO_RECVSTAMP
> or whether any IP options want timestamp or whether tcpdump is
> listening etc.

Yes, I understand why we want a time-stamp very early...but if
we can get _some_ sort of time stamp very cheap (TSC, for example)
then we can potentially defer the more expensive conversion of
this stamp into the equivalent of whatever do_gettimeofday will
give us.

We could set an 'is-timestamp-converted-already' flag on the skb and have
a macro that gets the timestamp.  This macro can do the conversion
as needed and return the value to calling code.  For platforms that do
not support TSC or it's equivalent, can just use gettimeofday for the
original stamp and set the flag..

-- 
Ben Greear <[email-masked]>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear