Re: loaded router, excessive getnstimeofday in oprofile\

Andi Kleen
2008-08-27T18:29:57Z

> Doing the expensive timestamping in a possibly delayed thread (ie some
> milliseconds
> after hardware notification) is wrong/useless.

We had this discussion earlier, please review the thread I linked to.

Note that interrupts can be arbitarily delayed too (both by cli
and by interrupt mitigation), even on a non RT kernel.

If you want exact notification (packet arriving at your NIC's buffers) you
need NIC hardware support (and more and more NICs have it[1]).
If you do it in software then even the interrupt is at the end of a long
queue with a pretty much arbitary delay. Doing it in socket context is
just one queue more. It's pretty much all arbitary.

The argument for doing it as late as possible is the prohibitive
cost on some systems as people notice all the time.

-Andi

[1] Unfortunately not necessarily synchronized with system time.