Re: Some questions regarding vfs / ffs

[ Available lists | Index of freebsd-hackers | Month of Oct 2001 | Week of 16 Oct 2001 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Dag-Erling Smorgrav <des@ofug.org>
Date
16 Oct 2001 19:23:35
Subject
Re: Some questions regarding vfs / ffs
Message-ID
xzpk7xvvwbw.fsf@flood.ping.uio.no

In reply to
References to

[ Hide this part ]
John Baldwin <jhb@FreeBSD.org> writes:
> Not quite. You see, when we set the mount vnode pointer inside the
> vnode, we get the mntvnode mutex while holding the vnode interlock,
> so the order is thus vnode -> mntvnode. So, the ffs_sync() loop
> can't lock the vnode while holding the mntvnode lock. It actually
> used to do that.

You're basically agreeing with me :) ffs_sync() releases the mntvnode
lock early so it can grab the vnode lock, but if I'm right about it
not needing the vnode lock yet at that point, it can gold the mntvnode
lock longer - until after it's decided whether or not the vnode needs
syncing - which means one less mntnode lock release / acquisition and
one less vnode lock acquisition / release per non-dirty vnode,
reducing the number of lock operations per vnode from four to nearly
zero (as the ratio of dirty vnodes to clean vnodes is usually very
low, the average number of lock operations per vnode examined will
approach zero)

DES
--
Dag-Erling Smorgrav - des@ofug.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Elapsed time: 0.382 seconds