diff options
author | attilio <attilio@FreeBSD.org> | 2012-04-09 17:05:18 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-04-09 17:05:18 +0000 |
commit | 628004ddfb14301b6958eff7fd70dc889f1b6f5e (patch) | |
tree | 8aac67e7dc8be50da7ef586592b2086e9064bbc7 /sys/fs | |
parent | b5a7a06de171e39df8cc4e199c50fe0697127894 (diff) | |
download | FreeBSD-src-628004ddfb14301b6958eff7fd70dc889f1b6f5e.zip FreeBSD-src-628004ddfb14301b6958eff7fd70dc889f1b6f5e.tar.gz |
- 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
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 5c86c36..be42f9a 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; |