Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Dec 2007 09:24:12 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        Mark Fullmer <maf@splintered.net>, freebsd-stable@freebsd.org, "Freebsd-Net@Freebsd. Org" <freebsd-net@freebsd.org>
Subject:   Re: Packet loss every 30.999 seconds
Message-ID:  <20071225091009.L3200@besplex.bde.org>
In-Reply-To: <20071224131906.GB57756@deviant.kiev.zoral.com.ua>
References:  <20071221234347.GS25053@tnn.dglawrence.com> <MDEHLPKNGKAHNMBLJOLKMEKLJAAC.davids@webmaster.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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071225091009.L3200>