diff options
author | Avi Kivity <avi@qumranet.com> | 2007-04-15 16:31:09 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-05-03 10:52:29 +0300 |
commit | b5a33a75720c03d58d8281a72b45ffd214f00ed7 (patch) | |
tree | 7451b196f292eb96caf5173ad3c6459ab9efb1d7 /drivers/kvm/kvm_main.c | |
parent | 417726a3fbecb2092f1054bbaee87bc442b05ef3 (diff) | |
download | lwn-b5a33a75720c03d58d8281a72b45ffd214f00ed7.tar.gz lwn-b5a33a75720c03d58d8281a72b45ffd214f00ed7.zip |
KVM: Use slab caches to allocate mmu data structures
Better leak detection, statistics, memory use, speed -- goodness all
around.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 0b30631585bd..ab4dbd7fa5f8 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -3063,6 +3063,10 @@ static __init int kvm_init(void) static struct page *bad_page; int r; + r = kvm_mmu_module_init(); + if (r) + goto out4; + r = register_filesystem(&kvm_fs_type); if (r) goto out3; @@ -3091,6 +3095,8 @@ out: out2: unregister_filesystem(&kvm_fs_type); out3: + kvm_mmu_module_exit(); +out4: return r; } @@ -3100,6 +3106,7 @@ static __exit void kvm_exit(void) __free_page(pfn_to_page(bad_page_address >> PAGE_SHIFT)); mntput(kvmfs_mnt); unregister_filesystem(&kvm_fs_type); + kvm_mmu_module_exit(); } module_init(kvm_init) |