DragonFly BSD
DragonFly kernel List (threaded) for 2006-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: vnode lock below vfs


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Aug 2006 09:12:25 -0700 (PDT)

:btw, in case you haven't looked at it, what Apple seems to have done for
:Darwin8 is put a mutex lock right in the vnode. The vnode operation stub
:grabs this mutex lock, if the flag in the vfs switch says the file system
:isn't smp safe. (This is true for all file systems, as of 10.4.6.)
:
:The effect is similar to a vnode lock grabbed right at the vnode op call.
:
:I don't know if this would be of any use for what you are trying to do, rick

    We actually do have a spinlock right in the vnode... its the spinlock
    that is used to interlock the lockmgr lock, but it can be accessed
    independantly of the lockmgr lock.

    I will be using the spinlock to control sequencing of the reference count
    in today's commit (v_usecount and v_holdcnt, don't ask me why the names
    are abbreviated differently :-)).

    We haven't quite gotten the MP lock down to the VFS layer yet, but
    these changes will move it closer.   Since the VOP calls can 
    potentially go through a transport layer doing the MP locking in the
    kernel layer would probably wind up being too messy.  I will probably
    just do the slogwork required to have each target procedure in the
    filesystem obtain and release the MP lock itself.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]