Re: VM object cache misses
Re: VM object cache misses
- Subject: Re: VM object cache misses
- From: Quinn <email@hidden>
- Date: Fri, 15 Jan 2010 09:40:36 +0000
At 15:16 +1100 15/1/10, Godfrey van der Linden wrote:
What is the "Object cache" reported by vm_stat
I believe [1] this is a cache of vm_object_t objects whose reference
counts have hit zero but which persist in the hope that they get
reused. For example, if you map a file, the kernel creates a
vm_object_t to represent the file to the VM subsystem. If you unmap
it, the vm_object_t's reference count would drop to zero, but the
object would persist in the cache. If you then immediately remapped
it, it wouldn't need to recreate that object (saving both the object
creation time and preserving the resident pages associated with the
object).
Check out the comments associated with VM_OBJECT_CACHE in the following file:
<http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/osfmk/vm/vm_object.c>
and why is its hit-rate so low?
I don't understand the dynamic behaviour of the VM subsystem well
enough to answer that question. I will note that the cache is pretty
small (vm_object_cached_max defaults to 512).
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
[1] I don't have time to trace the logic from vm_stat to this
vm_object_t cache, but I'm pretty confident about that this is what
it's talking about.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden