diff options
author | alc <alc@FreeBSD.org> | 2013-06-05 17:00:10 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-06-05 17:00:10 +0000 |
commit | b4fae704741d01b4c64b7b2668b5381c67811ccc (patch) | |
tree | f830c4874762a4e17862e90abf6836c133a47055 /sys/fs/procfs | |
parent | 5d26938b1d35cf753994309c70a0ef31b8302288 (diff) | |
download | FreeBSD-src-b4fae704741d01b4c64b7b2668b5381c67811ccc.zip FreeBSD-src-b4fae704741d01b4c64b7b2668b5381c67811ccc.tar.gz |
Relax the vm object locking. Use a read lock.
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r-- | sys/fs/procfs/procfs_map.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index 542c8fe..eae70229 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -132,7 +132,7 @@ procfs_doprocmap(PFS_FILL_ARGS) privateresident = 0; obj = entry->object.vm_object; if (obj != NULL) { - VM_OBJECT_WLOCK(obj); + VM_OBJECT_RLOCK(obj); if (obj->shadow_count == 1) privateresident = obj->resident_page_count; } @@ -148,9 +148,9 @@ procfs_doprocmap(PFS_FILL_ARGS) for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) { if (tobj != obj) - VM_OBJECT_WLOCK(tobj); + VM_OBJECT_RLOCK(tobj); if (lobj != obj) - VM_OBJECT_WUNLOCK(lobj); + VM_OBJECT_RUNLOCK(lobj); lobj = tobj; } last_timestamp = map->timestamp; @@ -181,12 +181,12 @@ procfs_doprocmap(PFS_FILL_ARGS) break; } if (lobj != obj) - VM_OBJECT_WUNLOCK(lobj); + VM_OBJECT_RUNLOCK(lobj); flags = obj->flags; ref_count = obj->ref_count; shadow_count = obj->shadow_count; - VM_OBJECT_WUNLOCK(obj); + VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { vn_fullpath(td, vp, &fullpath, &freepath); vrele(vp); |