[En-Nut-Discussion] Preview Fix 060626
Harald Kipp
harald.kipp at egnite.de
Tue Jun 27 11:24:31 CEST 2006
Michael,
At 00:43 27.06.2006 +0200, you wrote:
>With the old version (Henrik's and my patches) there are actually hardly any
>signs that the board is being flooded with messages besides a minor 5%-10%
>drop in throughput. Whereas the new implementation completely breaks
>together till no TCP/IP packets are actually handled. Yet it immediately
>recovers when the packet flooding stops.
I had a similar "feeling". Not sure about the loop in NutThreadResume():
/*
* Process events that have been posted from interrupt context.
*/
td = nutThreadList;
while (td) {
qhp = (NUTTHREADINFO **)(td->td_queue);
if (qhp) {
cnt = 0;
for (;;) {
NutEnterCritical();
cnt += td->td_qpec;
td->td_qpec = 0;
tqp = *qhp;
NutExitCritical();
if (cnt == 0 || tqp == SIGNALED) {
break;
}
NutEventPostAsync((HANDLE *)qhp);
cnt--;
}
}
td = td->td_next;
}
>My suspicion is that the thread priority handling has somehow changed as
>e.g. the main thread shows no signs of slowing down.
This takes over the task that had been previously done in interrupt
context. It definitely increases the context switch time. My assumption
is, that the Ethernet receiver thread returns later than before, which
in turn may cause Ethernet controller overruns.
Harald
More information about the En-Nut-Discussion
mailing list