[ntp:hackers] recvbuf fixes

Danny Mayer mayer at ntp.isc.org
Mon Dec 12 16:38:41 UTC 2005


Brian Utterback wrote:
> Harlan Stenn wrote:
> 
>>> I forgot to mention that after I removed the [UN]BLOCKIO code it still
>>> goes ballistic when I use -N
>>>
>>> Should we disable this capability for now?
>>
>>
>> No, let's find the busy loop and fix it.
>>
>> Even without -N this code is sucking cycles needlessly.
>>
>> H
> 
> 
> I think that the problem is with the line:
> 
>  if (!was_alarmed && tot_full_recvbufs > 0)
> 
> The tot_full_recvbufs variable was set by a call to full_recvbuffs().
> If there are no full recvbufs, then tot_full_recvbufs will be zero
> and the following clause is skipped. Since it is in this clause that
> the select call lives, while there is nothing to do, we never stop
> doing it, a paradox if ever I heard one. I think that the
> test should be "tot_full_recvbufs == 0".
> 

Brian, my apologies. I forgot to include you on the mail I send
yesterday. That indeed was the problem that I found yesterday and fixed.

Danny




More information about the hackers mailing list