Re: loaded router, excessive getnstimeofday in oprofile

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Thursday, August 28, 2008 - 12:22 am

> I've worked with systems where SO_TIMESTAMP has been used for

But didn't you really want a "end2end" time stamp in this case,
as in really at the end of all kernel/hardware queues on your side.

A packet roughly travels this way on a normal NIC before it hits recvmsg()

wire -> NIC on die buffers -> NIC RX ring -> interrupt handler -> 
NAPI or per CPU queue -> softirq socket lookup -> socket queue -> recvmsg

These all do their own queuing and all queues can add delays depending
on the load.  Right now SO_TIMESTAMP is in the interrupt handler,
but it's just an arbitary position in a multitude of queues.

For video conferencing (or e.g. in general if you implement a retransmit 
timeout in user space) scheduling delays on the local box
surely need to be taken into account too because they all add
to the final timing of the packets on the wire.

The queues inside the system are really part of the network
too. In Linux for example the algorithms who size the TCP 
buffer space know that and especially take account for it
and reserve a local queue buffer. 


Yes, but why ignore local scheduling delays? 


I think it's the other way round. Why would the real time 
protocol care when it hits some arbitary queue in the network
stack instead of the time when the application can really
read the data?
 

SO_TIMESTAMP was originally invented for passive network
monitoring as in tcpdump (for which PACKET sockets were designed
originally, DHCP is really just abusing them imho). There it makes 
some sense to do the time stamp as near on the wire as possible
but really a hardware time stamp would be better because
it is even nearer. But for anything that does end2end it's
the wrong semantics anyways because ignoring local queueing 
delays would be just a bug, and SO_TIMESTAMP ignores them currently.

-Andi

-- 
ak@linux.intel.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Thu Aug 21, 6:57 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Thu Aug 21, 7:23 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Jarek Poplawski, (Tue Aug 26, 2:51 am)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Tue Aug 26, 3:29 am)
Re: loaded router, excessive getnstimeofday in oprofile, Jarek Poplawski, (Tue Aug 26, 3:47 am)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Tue Aug 26, 3:49 am)
Re: loaded router, excessive getnstimeofday in oprofile, Jarek Poplawski, (Tue Aug 26, 4:07 am)
Re: loaded router, excessive getnstimeofday in oprofile, Jarek Poplawski, (Tue Aug 26, 4:15 am)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Tue Aug 26, 4:16 am)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Tue Aug 26, 4:32 am)
Re: loaded router, excessive getnstimeofday in oprofile, Jarek Poplawski, (Tue Aug 26, 4:32 am)
Re: loaded router, excessive getnstimeofday in oprofile, Evgeniy Polyakov, (Tue Aug 26, 1:14 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Eric Dumazet, (Tue Aug 26, 1:44 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Evgeniy Polyakov, (Tue Aug 26, 1:51 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Wed Aug 27, 5:09 am)
Re: loaded router, excessive getnstimeofday in oprofile, Evgeniy Polyakov, (Wed Aug 27, 5:36 am)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Wed Aug 27, 7:00 am)
Re: loaded router, excessive getnstimeofday in oprofile, Evgeniy Polyakov, (Wed Aug 27, 7:23 am)
Re: loaded router, excessive getnstimeofday in oprofile, Stephen Hemminger, (Wed Aug 27, 9:17 am)
Re: loaded router, excessive getnstimeofday in oprofile, Jarek Poplawski, (Wed Aug 27, 10:14 am)
Re: loaded router, excessive getnstimeofday in oprofile, Eric Dumazet, (Wed Aug 27, 10:27 am)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Wed Aug 27, 2:34 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Wed Aug 27, 3:18 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Wed Aug 27, 5:48 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Jason Uhlenkott, (Wed Aug 27, 7:39 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Wed Aug 27, 8:10 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Stephen Hemminger, (Wed Aug 27, 8:35 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Joe Malicki, (Wed Aug 27, 11:28 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Andi Kleen, (Thu Aug 28, 12:22 am)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Thu Aug 28, 1:49 am)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Thu Aug 28, 8:02 am)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Thu Aug 28, 9:48 am)
Re: loaded router, excessive getnstimeofday in oprofile, Eric Dumazet, (Thu Aug 28, 11:57 am)
Re: loaded router, excessive getnstimeofday in oprofile, Ilpo Järvinen, (Thu Aug 28, 12:01 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Thu Aug 28, 12:25 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Thu Aug 28, 12:31 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Thu Aug 28, 12:36 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Eric Dumazet, (Thu Aug 28, 12:37 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Thu Aug 28, 12:42 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Thu Aug 28, 12:55 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Denys Fedoryshchenko, (Thu Aug 28, 12:59 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Thu Aug 28, 1:32 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Thu Aug 28, 1:47 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Stephen Hemminger, (Fri Aug 29, 8:43 am)
Re: loaded router, excessive getnstimeofday in oprofile, Evgeniy Polyakov, (Fri Aug 29, 1:43 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Valdis.Kletnieks, (Sun Aug 31, 7:39 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Sun Aug 31, 8:51 pm)
Re: loaded router, excessive getnstimeofday in oprofile, Valdis.Kletnieks, (Sun Aug 31, 9:08 pm)
Re: loaded router, excessive getnstimeofday in oprofile, David Miller, (Sun Aug 31, 9:10 pm)