diff options
author | Richard Braun <rbraun@sceen.net> | 2016-06-17 12:50:45 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2016-06-17 12:58:33 +0200 |
commit | 8fcdfb646d145f285341ef597568bb9e003ce28f (patch) | |
tree | d2b8ff63f7c0403c329362e4352505b4f2b8b5e1 /vm/vm_object.h | |
parent | fdf86cccfeb4c3e09e024b3a35bbce6308f36412 (diff) | |
download | gnumach-8fcdfb646d145f285341ef597568bb9e003ce28f.tar.gz gnumach-8fcdfb646d145f285341ef597568bb9e003ce28f.tar.bz2 gnumach-8fcdfb646d145f285341ef597568bb9e003ce28f.zip |
Change page cache statistics
Instead of reporting statistics about unreferenced objects (the object
cache), report statistics about external objects (the page cache).
* vm/vm_object.c (vm_object_cached_count): Remove variable.
(vm_object_cache_add): Remove object cache stats updates.
(vm_object_cache_remove): Likewise.
(vm_object_terminate): Update page cache stats.
* vm/vm_object.h (vm_object_cached_count): Remove variable.
(vm_object_cached_pages): Likewise.
(vm_object_cached_pages_lock_data): Likewise.
(vm_object_cached_pages_update): Remove macro.
(vm_object_external_count): New extern variable.
(vm_object_external_pages): Likewise.
* vm/vm_resident.c (vm_object_external_count): New variable.
(vm_object_external_pages): Likewise.
(vm_page_insert): Remove object cache stats updates and
update page cache stats.
(vm_page_replace): Likewise.
(vm_page_remove): Likewise.
* vm/vm_user.c (vm_cache_statistics): Report page cache stats instead
of object cache stats.
Diffstat (limited to 'vm/vm_object.h')
-rw-r--r-- | vm/vm_object.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/vm/vm_object.h b/vm/vm_object.h index e1dd0ba1..1914e8ee 100644 --- a/vm/vm_object.h +++ b/vm/vm_object.h @@ -394,20 +394,9 @@ MACRO_END /* * Page cache accounting. * - * The number of cached objects and pages can be read - * without holding any lock. + * The page queues must be locked when changing these counters. */ - -extern int vm_object_cached_count; - -extern int vm_object_cached_pages; -decl_simple_lock_data(extern,vm_object_cached_pages_lock_data) - -#define vm_object_cached_pages_update(page_count) \ - MACRO_BEGIN \ - simple_lock(&vm_object_cached_pages_lock_data); \ - vm_object_cached_pages += (page_count); \ - simple_unlock(&vm_object_cached_pages_lock_data); \ - MACRO_END +extern int vm_object_external_count; +extern int vm_object_external_pages; #endif /* _VM_VM_OBJECT_H_ */ |