public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* voluntary-preempt-2.6.8.1-P1 seems to lose UDP messages.
@ 2004-08-18 11:10 P.O. Gaillard
  2004-08-18 18:31 ` Lee Revell
  2004-08-19  7:25 ` P.O. Gaillard
  0 siblings, 2 replies; 3+ messages in thread
From: P.O. Gaillard @ 2004-08-18 11:10 UTC (permalink / raw)
  To: linux-kernel

Hello,

I have a real-time application that transmits 20 MBytes/s over UDP/Gigabit 
Ethernet between 2 PCs. The NICs are from Intel and use the e1000 driver 
(MTU=1500). On the receive side, the computer has to process the data (real-time 
tasks doing signal processing work and using up 50% of the CPU time).

This app works OK with 2.6.7 and 2.6.8.1 : the app does not complain about lost 
messages.

But when I use the voluntary-preemt-2.6.8.1-P1 patch on the receiving PC, the 
app starts complaining about lost messages. And also, netstat -s -u shows that 
lots of UDP packets are lost (on the PC that receives the data).
[root@centaurus root]# netstat -u -s
Udp:
     8433 packets received
     0 packets to unknown port received.
     869 packet receive errors
     366 packets sent

I have already retried with the e1000 parameters RxIntDelay=0 and 
RxDescriptors=1024. This did not improve anything.

Note: I don't see any error message with dmesg nor in /var/log/messages.

I find the voluntary-preempt series very important and would really like it to 
make its way into the stock kernel. I would therefore gladly make additional 
tests to help you find the problem. Please give me directions.


	thanks for your help,

	P.O. Gaillard



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: voluntary-preempt-2.6.8.1-P1 seems to lose UDP messages.
  2004-08-18 11:10 voluntary-preempt-2.6.8.1-P1 seems to lose UDP messages P.O. Gaillard
@ 2004-08-18 18:31 ` Lee Revell
  2004-08-19  7:25 ` P.O. Gaillard
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Revell @ 2004-08-18 18:31 UTC (permalink / raw)
  To: pierre-olivier.gaillard; +Cc: linux-kernel

On Wed, 2004-08-18 at 07:10, P.O. Gaillard wrote:
> Hello,
> 
> I have a real-time application that transmits 20 MBytes/s over UDP/Gigabit 
> Ethernet between 2 PCs. 

> But when I use the voluntary-preemt-2.6.8.1-P1 patch on the receiving PC, the 
> app starts complaining about lost messages.

It sounds like you need to set the network card irq to be non-threaded. 
What is the output of:

root@mindpipe:/home/rlrevell/kernel-source/linux-2.6.8.1-P3# find
/proc/irq/ -name threaded -print -a -exec cat {} \;
/proc/irq/15/ide1/threaded
1
/proc/irq/14/ide0/threaded
1
/proc/irq/12/uhci_hcd/threaded
1
/proc/irq/11/eth0/threaded
1
/proc/irq/11/uhci_hcd/threaded
1
/proc/irq/10/EMU10K1/threaded
0
/proc/irq/10/uhci_hcd/threaded
1
/proc/irq/8/rtc/threaded
0
/proc/irq/1/i8042/threaded
1

You probably want all of these to be 1 except ethX.

Lee 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: voluntary-preempt-2.6.8.1-P1 seems to lose UDP messages.
  2004-08-18 11:10 voluntary-preempt-2.6.8.1-P1 seems to lose UDP messages P.O. Gaillard
  2004-08-18 18:31 ` Lee Revell
@ 2004-08-19  7:25 ` P.O. Gaillard
  1 sibling, 0 replies; 3+ messages in thread
From: P.O. Gaillard @ 2004-08-19  7:25 UTC (permalink / raw)
  To: linux-kernel

P.O. Gaillard wrote:

 > Hello,
 >
 > I have a real-time application that transmits 20 MBytes/s over
 > UDP/Gigabit Ethernet between 2 PCs. The NICs are from Intel and use the
 > e1000 driver (MTU=1500). On the receive side, the computer has to
 > process the data (real-time tasks doing signal processing work and using
 > up 50% of the CPU time).
 >
 > This app works OK with 2.6.7 and 2.6.8.1 : the app does not complain
 > about lost messages.

Thanks to the support of Pádraig Brady, I have found out that the 
voluntary-preempt patch is "innocent".
In fact, it seems that the patch changes the scheduling of the application and 
reveals that the UDP reception buffer is too small for this application.

So I changed /proc/sys/net/core/rmem_default to 200KBytes as instructed and the 
problem disappeared.

It seems a bit counter-intuitive since the application has real-time threads 
that are supposed to receive and timestamp all incoming messages as soon as they 
arrive. I would therefore have expected the voluntary-preempt patch to improve 
the reactivity of these tasks.

Anyway, it seems safe to say that the losses of UDP messages were not caused by 
a bug in the voluntary-preempt patch. This is good news since it means that I 
can use this patch.

Note: after running the program for the whole night the problem seemed to come 
back after 2 hours or so. I will try with eth0/threaded=0 as Lee Revell suggested.

   thanks a lot for your help,

	P.O. Gaillard


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-19  7:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-18 11:10 voluntary-preempt-2.6.8.1-P1 seems to lose UDP messages P.O. Gaillard
2004-08-18 18:31 ` Lee Revell
2004-08-19  7:25 ` P.O. Gaillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox