On Jul 21, 2014, at 9:45 PM, Richard W.M. Jones wrote: [ ... ] > I have spent a bit of time inserting printks around memory allocations > in arch/arm/kvm/mmu.c (since that file seems to be responsible for > guest page tables and guest memory allocation) but I haven't come up > with anything conclusive. Hi, Richard Have you figure out this issue? IMHO, it is needed to dive into three functions: mmu_topup_memory_cache, mmu_free_memory_cache and mum_memory_cache_alloc. They manage both the number of allocated (cached) pages and the number of usable pages with a single parameter, nobjs. However, they can have different values and mmu_free_memory_cache only refers to the number of usable pages, not the total number of allocated pages. When VM launches, mmu_topup_memory_cache is called with min=2 and max=40. nobjs is set to 40 at this time frame. As mmu_memory_cache_alloc is called, nobjs is decreased. Let's try to destroy VM now. mmu_free_memory_cache tries to free smaller pages instead of 40 pages. It reaches to memory leak. Since I don't have AARCH64 platform, I cannot reproduce the issue and validate my logic on real hardware :( My analysis could be incorrect. Please correct me if I am wrong. - Jungseok Lee _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm