[En-Nut-Discussion] TCP vs. Memory

Harald Kipp harald.kipp at egnite.de
Sun Oct 18 18:40:05 CEST 2009


Michael Jones wrote:

> Some time ago Bernd and Harald were having a good chat (see below) about the
> way Nut/OS handles ZWP.
...
> So the questions are:
> 
> Has anybody else made observations of similar behavior,
> and what's the status on the changes suggested by Bernd and Harald?

The situation is this: Adding an additional thread would require more
RAM again. There had been a previous discussion in this list about how
to split interrupt handling, so it won't require a full fledged thread
in many drivers. I tried to implement some kind of lightweight thread,
called task. A specific thread in the kernel should provide a task queue.

I know, this may sound weird without knowing further details. Well, the
thing turned out to become quite complicated and after about a week
trying to implement this beast I had to give up due to lack of more
time. In fact I ended up in a situation, where I was in doubt whether
this complicated part would really help to save memory.

My current suggestion is, to go the simple way and just add a full
thread to the transmitter. This will need more RAM, but help to get
packets out as soon as possible. And it will also solve the ICMP packet
loss after ARP cache flush.

Harald


Btw. the reason for the current design was the RTL8019, which typically
crashed in input overflows. Resetting the controller blocked the system
for several hundred milliseconds, so Nut/Net was designed to avoid input
overflows. Actually this was a bad idea. It should have been designed to
get rid of outgoing packets in the first place and simply ignore
incoming packets in low memory situations.




More information about the En-Nut-Discussion mailing list