Packet loss every 30.999 seconds

Bruce Evans brde at optusnet.com.au
Mon Dec 24 14:24:21 PST 2007


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


More information about the freebsd-net mailing list