From owner-freebsd-net@FreeBSD.ORG Mon Aug 26 14:41:09 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 22940EB4; Mon, 26 Aug 2013 14:41:09 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id D608328DA; Mon, 26 Aug 2013 14:41:08 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 77F387300A; Mon, 26 Aug 2013 16:46:01 +0200 (CEST) Date: Mon, 26 Aug 2013 16:46:01 +0200 From: Luigi Rizzo To: Andre Oppermann Subject: Re: route/arp lifetime (Re: it's the output, not ack coalescing (Re: TSO and FreeBSD vs Linux)) Message-ID: <20130826144601.GA11595@onelab2.iet.unipi.it> References: <20130814124024.GA64548@onelab2.iet.unipi.it> <201308141740.28779.zec@fer.hr> <20130814154853.GA66341@onelab2.iet.unipi.it> <521204A9.7080607@ipfw.ru> <52152837.9010101@freebsd.org> <5218ABB4.5070601@ipfw.ru> <5218E8B6.5090407@freebsd.org> <521B65EF.1030408@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <521B65EF.1030408@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Net , Adrian Chadd , "Alexander V. Chernikov" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 14:41:09 -0000 On Mon, Aug 26, 2013 at 04:27:59PM +0200, Andre Oppermann wrote: ... > > 1. lle lock to rmlock. > > 2. if_addr and IN_ADDR locks to rmlocks. > > 3. routing table locking (rmlocks, and by doing away with rtentry locks and refcounting > through copy-out on lookup and prohibition of having any pointers into the rtable). re. the last item, the problem is that we need to access *ifp after the route lookup, and this cannot be solved with a copy-on-lookup (I guess at the moment the rte has a refcounted pointer to the ifp). This is why i argued that it might be useful to cache into the socket a refcounted pointer into the ifp (or rte) and update it lazily (periodically or through generation counters). cheers luigi