Thread (209 messages) 209 messages, 18 authors, 2003-06-17

Re: Route cache performance under stress

flat view

From: Ben Greear <hidden>
Date: 2003-06-11 01:51:17

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 [off-list ref]       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help