tech-kern archive

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

Re: Layered fs, vnode locking and v_vnlock removal



Juergen Hannken-Illjes <hannken%eis.cs.tu-bs.de@localhost> wrote:
> With our current vnode lock implementation VOP_LOCK() and VOP_UNLOCK()
> are not symmetric.  A vnode may be locked from one file system and
> unlocked from another one.  Is there any reason left to have layered
> file systems share the vnode lock with lower file systems via v_vnlock?
> 
> The attached patch will remove v_vnlock and change layered file systems
> to always pass the locking VOP's down to the leaf file system.

I like the clean-up and removal of v_vnlock.  However, not sure about the
actual removal of lock sharing concept.  How about using rwlock_obj(9) on
v_vlock and holding a reference?  Amending vnalloc() to take the "shared
vnode" would work.  Most of your patch could be applied and lock sharing
done in a simpler way.  

For rmind-uvmplock branch, I will likely need to do the same sharing on
vmobjlock/v_interlock to have the same lock on page owners (that would
also simplify some locking in UVM/UBC, as a side note).  In such case,
it is better to have a consistent logic on v_lock.

However, this needs some extra thought and code inspection for potential
corner cases.

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index