diff options
author | attilio <attilio@FreeBSD.org> | 2013-03-09 02:05:29 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-03-09 02:05:29 +0000 |
commit | 754f3790b85afd6cd15e69b91ee97848364f75f5 (patch) | |
tree | c871d16bf1f46a125e55913c6c35c3a75d4502b0 /sys/vm/vm_object.h | |
parent | d382fc973f470775c34dc384cf8eef1be1e5ed54 (diff) | |
download | FreeBSD-src-754f3790b85afd6cd15e69b91ee97848364f75f5.zip FreeBSD-src-754f3790b85afd6cd15e69b91ee97848364f75f5.tar.gz |
Merge from vmc-playground:
Introduce a new KPI that verifies if the page cache is empty for a
specified vm_object. This KPI does not make assumptions about the
locking in order to be used also for building assertions at init and
destroy time.
It is mostly used to hide implementation details of the page cache.
Sponsored by: EMC / Isilon storage division
Reviewed by: jeff
Reviewed by: alc (vm_radix based version)
Tested by: flo, pho, jhb, davide
Diffstat (limited to 'sys/vm/vm_object.h')
-rw-r--r-- | sys/vm/vm_object.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 76caa75..319324f 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -229,6 +229,13 @@ void vm_object_pip_wakeup(vm_object_t object); void vm_object_pip_wakeupn(vm_object_t object, short i); void vm_object_pip_wait(vm_object_t object, char *waitid); +static __inline boolean_t +vm_object_cache_is_empty(vm_object_t object) +{ + + return (object->cache == NULL); +} + vm_object_t vm_object_allocate (objtype_t, vm_pindex_t); boolean_t vm_object_coalesce(vm_object_t, vm_ooffset_t, vm_size_t, vm_size_t, boolean_t); |