|
From: | address@hidden |
Subject: | Re: [lwip-users] Improving performance when using OS. |
Date: | Wed, 27 Oct 2010 21:27:36 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.11) Gecko/20101013 Thunderbird/3.1.5 |
Timmy Brolin wrote:
The risk for UDP-only should not be too high. TCP is more complicated because in some cases, the original thread is sent to sleep until the RX- or timer-thread finishes the work and wakes the application thread. UDP does not have these such situations.Ok, thanks for the input. That is why I posted on the mailing list. To get an impression of the potential risks and problems involved. We have a UDP-loop application using the netconn interface (it responds to any UDP frame by sending another UDP frame).
I might be wrong, but using the raw API, the time to change the application might be higher, but both the time for testing and the risk should be lower. Using CORE_LOCKING and the raw API, you might even get away with no thread change at all. Given the fact that the netconn API is not really portable, too, you wouldn't even lose portability :-)It takes approximately 500µs for a UDP frame to be received by the device, sent up to the application layer, and then looped back out on the network. I was hoping for a bit higher performance than that. (Running on a 100MHz 32bit system with zero copy Ethernet driver). CORE_LOCKING should at the very least get rid of two memory allocations, two deallocations, two task reschedules, and reduce function depth. That has to make some kind of difference. We'll probably do some tests to evaluate exactly how much performance can be gained, and from that decide if it is worth the additional risk and testing time.
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |