Subject: Re: Multicast packet loss

From: Eric Dumazet <[email-masked]>
Date: Mon, 02 Feb 2009 14:53:06 +0100

Kenny Chang a écrit :
> Ah, sorry, here's the test program attached.
> 
> We've tried 2.6.28.1, but no, we haven't tried the 2.6.28.2 or the
> 2.6.29.-rcX.
> 
> Right now, we are trying to step through the kernel versions until we
> see where the performance drops significantly.  We'll try 2.6.29-rc soon
> and post the result.
> 
> Neil Norman wrote:

On latest kernels, we have a "timer_slack_ns" default of 50.000 ns, aka 50us

So usleep(20) sleeps much more than expected.

You might add in your program a call to prcrl() to setup a smaller timer_slack :

#ifndef PR_SET_TIMERSLACK
#define PR_SET_TIMERSLACK 29
#endif
/*
 * Setup a timer resolution of 1000 ns : 1 us
 */
prctl(PR_SET_TIMERSLACK, 1000);