From owner-freebsd-net@FreeBSD.ORG Mon Dec 24 22:24:21 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A77EC16A421; Mon, 24 Dec 2007 22:24:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by mx1.freebsd.org (Postfix) with ESMTP id 3E36713C43E; Mon, 24 Dec 2007 22:24:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail12.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lBOMOChC015490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Dec 2007 09:24:18 +1100 Date: Tue, 25 Dec 2007 09:24:12 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Kostik Belousov In-Reply-To: <20071224131906.GB57756@deviant.kiev.zoral.com.ua> Message-ID: <20071225091009.L3200@besplex.bde.org> References: <20071221234347.GS25053@tnn.dglawrence.com> <20071222050743.GP57756@deviant.kiev.zoral.com.ua> <20071223032944.G48303@delplex.bde.org> <20071222201613.GX57756@deviant.kiev.zoral.com.ua> <20071223095314.G1323@delplex.bde.org> <20071224131906.GB57756@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Mark Fullmer , freebsd-stable@freebsd.org, "Freebsd-Net@Freebsd. Org" Subject: Re: Packet loss every 30.999 seconds X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 24 Dec 2007 22:24:21 -0000 On Mon, 24 Dec 2007, Kostik Belousov wrote: > On Sun, Dec 23, 2007 at 10:20:31AM +1100, Bruce Evans wrote: >> On Sat, 22 Dec 2007, Kostik Belousov wrote: >>> Ok, since you talked about this first :). I already made the following >>> patch, but did not published it since I still did not inspected all >>> callers of MNT_VNODE_FOREACH() for safety of dropping mount interlock. >>> It shall be safe, but better to check. Also, I postponed the check >>> until it was reported that yielding does solve the original problem. >> >> Good. I'd still like to unobfuscate the function call. > What do you mean there ? Make the loop control and overheads clear by making the function call explicit, maybe by expanding MNT_VNODE_FOREACH() inline after fixing the style bugs in it. Later, fix the code to match the comment again by not making a function call in the usual case. This is harder. >> Putting the count in the union seems fragile at best. Even if nothing >> can access the marker vnode, you need to context-switch its old contents >> while using it for the count, in case its old contents is used. Vnode- >> printing routines might still be confused. > Could you, please, describe what you mean by "contex-switch" for the > VMARKER ? Oh, I didn't notice that the marker vnode is out of band (a whole new vnode is malloced for each marker). The context switching would be needed if an ordinary active vnode that uses the union is used as a marker. Bruce