simply change kvm.h to work with the new lists and with blocks of 1MB
please note that the KVM_MMU_PAGES_DIVIDER is the magic, it control on
how much % memory will be allocated to the mmu pages,
KVM_MMU_PAGES_DIVIDER = 100 mean 1%
KVM_MMU_PAGES_DIVIDER = 50 mean 2%
--- kvm.h 2007-08-15 11:37:07.000000000 +0300
+++ new_kvm.h 2007-08-19 06:21:23.000000000 +0300
@@ -40,7 +40,8 @@
#define KVM_MAX_VCPUS 4
#define KVM_ALIAS_SLOTS 4
#define KVM_MEMORY_SLOTS 4
-#define KVM_NUM_MMU_PAGES 1024
+#define KVM_NUM_MMU_PAGES_BLOCK 256
+#define KVM_MMU_PAGES_DIVIDER 50
#define KVM_MIN_FREE_MMU_PAGES 5
#define KVM_REFILL_PAGES 25
#define KVM_MAX_CPUID_ENTRIES 40
@@ -136,6 +137,11 @@
};
};
+struct kvm_mmu_hash_block {
+ struct list_head head;
+ struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES_BLOCK];
+};
+
struct kvm_vcpu;
extern struct kmem_cache *kvm_vcpu_cache;
@@ -399,7 +405,8 @@
*/
struct list_head active_mmu_pages;
int n_free_mmu_pages;
- struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES];
+ int n_mmu_page_hash_blocks;
+ struct list_head mmu_page_hash_blocks;
struct kvm_vcpu *vcpus[KVM_MAX_VCPUS];
int memory_config_version;
int busy;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel