summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-09-09 19:20:23 +0000
committerkib <kib@FreeBSD.org>2012-09-09 19:20:23 +0000
commit3ed1c80d257237f50d1eb45a535cd5a9b2ce243e (patch)
tree0f1623ea0434b273e48d26ddda4c72d4d29053ef /sys/dev/acpica
parent5a86a6849adc026d814651fd6afc864b2377b9c8 (diff)
downloadFreeBSD-src-3ed1c80d257237f50d1eb45a535cd5a9b2ce243e.zip
FreeBSD-src-3ed1c80d257237f50d1eb45a535cd5a9b2ce243e.tar.gz
Allow shared lookups for nullfs mounts, if lower filesystem supports
it. There are two problems which shall be addressed for shared lookups use to have measurable effect on nullfs scalability: 1. When vfs_lookup() calls VOP_LOOKUP() for nullfs, which passes lookup operation to lower fs, resulting vnode is often only shared-locked. Then null_nodeget() cannot instantiate covering vnode for lower vnode, since insmntque1() and null_hashins() require exclusive lock on the lower. Change the assert that lower vnode is exclusively locked to only require any lock. If null hash failed to find pre-existing nullfs vnode for lower vnode and the vnode is shared-locked, the lower vnode lock is upgraded. 2. Nullfs reclaims its vnodes on deactivation. This is due to nullfs inability to detect reclamation of the lower vnode. Reclamation of a nullfs vnode at deactivation time prevents a reference to the lower vnode to become stale. Change nullfs VOP_INACTIVE to not reclaim the vnode, instead use the VFS_RECLAIM_LOWERVP to get notification and reclaim upper vnode together with the reclamation of the lower vnode. Note that nullfs reclamation procedure calls vput() on the lowervp vnode, temporary unlocking the vnode being reclaimed. This seems to be fine for MPSAFE filesystems, but not-MPSAFE code often put partially initialized vnode on some globally visible list, and later can decide that half-constructed vnode is not needed. If nullfs mount is created above such filesystem, then other threads might catch such not properly initialized vnode. Instead of trying to overcome this case, e.g. by recursing the lower vnode lock in null_reclaim_lowervp(), I decided to rely on nearby removal of the support for non-MPSAFE filesystems. In collaboration with: pho MFC after: 3 weeks
Diffstat (limited to 'sys/dev/acpica')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud