Date: Wed, 06 Sep 2006 11:01:48 -0600 From: Scott Long <scottl@samsco.org> To: Andre Oppermann <andre@FreeBSD.org> Cc: cvs-src@FreeBSD.org, Mike Silbersack <silby@silby.com>, Gleb Smirnoff <glebius@FreeBSD.org>, cvs-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet in_pcb.c tcp_subr.c tcp_timer.c tcp_var.h Message-ID: <44FEFEFC.80102@samsco.org> In-Reply-To: <44FEF244.4010005@freebsd.org> References: <200609061356.k86DuZ0w016069@repoman.freebsd.org> <20060906091204.B6691@odysseus.silby.com> <20060906143204.GQ40020@FreeBSD.org> <20060906093553.L6691@odysseus.silby.com> <20060906150129.GT40020@FreeBSD.org> <20060906151246.GU40020@FreeBSD.org> <44FEF244.4010005@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Andre Oppermann wrote:
> Gleb Smirnoff wrote:
>
>> followup on my last email:
>>
>> T> I think we should free the oldmost tcptw entry in a case if we can't
>> T> find the local endpoint. We can tell definitely that we can't find one
>> T> only in in_pcbbind_setup() in the "do {} while
>> (in_pcblookup_local)" cycle,
>> T> where EADDRNOTAVAIL is returned. We can't definitely tell this in
>> T> in_pcblookup_local() since we don't know whether tried port is the
>> T> last one.
>>
>> Another simple enough solution would be to msleep() with tcbinfo mutex
>> temporarily dropped if we fail to find a port. Then the
>> tcp_timer_2msl_tw()
>> on the next run will free tcptw entries and wake up us.
>>
>> Anyway, I'm strongly against doing the purge cycling in the syscalls.
>
>
> Seconded.
>
O(N) searches are poor at scaling too =-)
Scott
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44FEFEFC.80102>
