From owner-cvs-src@FreeBSD.ORG Wed Sep 6 17:02:06 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D83816A4DA; Wed, 6 Sep 2006 17:02:06 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D10443D58; Wed, 6 Sep 2006 17:02:02 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [10.10.3.185] ([165.236.175.187]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k86H1tkk094194; Wed, 6 Sep 2006 11:02:00 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <44FEFEFC.80102@samsco.org> Date: Wed, 06 Sep 2006 11:01:48 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andre Oppermann 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> In-Reply-To: <44FEF244.4010005@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.5 required=3.8 tests=SPF_SOFTFAIL autolearn=no version=3.1.1 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: cvs-src@FreeBSD.org, Mike Silbersack , Gleb Smirnoff , 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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2006 17:02:06 -0000 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