diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2012-04-09 17:05:18 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2012-04-09 17:05:18 +0000 |
commit | a0f2c37b6fdfa8df5f136227c945f4ea6a2d584a (patch) | |
tree | 8aac67e7dc8be50da7ef586592b2086e9064bbc7 /sys/fs | |
parent | 085e2c2102cee8aa05cfea9faf1f5b5fe0457314 (diff) | |
download | src-a0f2c37b6fdfa8df5f136227c945f4ea6a2d584a.tar.gz src-a0f2c37b6fdfa8df5f136227c945f4ea6a2d584a.zip |
- Introduce a cache-miss optimization for consistency with other
accesses of the cache member of vm_object objects.
- Use novel vm_page_is_cached() for checks outside of the vm subsystem.
Reviewed by: alc
MFC after: 2 weeks
X-MFC: r234039
Notes
Notes:
svn path=/head/; revision=234064
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 5c86c36fb85a..be42f9ab4fcd 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -662,7 +662,7 @@ lookupvpg: VM_OBJECT_UNLOCK(vobj); error = uiomove_fromphys(&vpg, offset, tlen, uio); } else { - if (__predict_false(vobj->cache != NULL)) + if (vm_page_is_cached(vobj, idx)) vm_page_cache_free(vobj, idx, idx + 1); VM_OBJECT_UNLOCK(vobj); vpg = NULL; |