|
From: | Alain M. |
Subject: | Re: [lwip-devel] Re: [task #7040] Work on tcp_enqueue |
Date: | Tue, 03 Feb 2009 15:19:49 -0200 |
User-agent: | Thunderbird 2.0.0.17 (X11/20080914) |
Hi Kieran, Kieran Mansley escreveu:
The third stage would be to find a way to prevent pbuf queues for multiple small writes: at least one MAC I used was not able to do scatter-gather, which means although I had a DMA-enabled MAC, I had to use memcpy to get the packets in one piece -> large, unnecessary performance hole! This could however require the exact opposite of the previous point (not splitting up tcp_write and tcp_enqueue).So we really need to know which is the bigger problem for people using lwIP. I want to avoid going down one road to solve one problem and then finding out we've made things worse for another problem.
My suggestion would be to create a compile time option: a) keep messages n separate pbufs b) allways concatenate if possible.There is a real trick behind that: if you have a 32 bit arch like ARM, it can be a lot faster if there exists a function concat_data or concat_pbufs that by default is memcpy, but is optimyzable. I have a book that shows up to 5x speed increment for such functions (without even using asm)...
Alain
[Prev in Thread] | Current Thread | [Next in Thread] |