On Wed, Jul 31, 2024 at 11:00 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > > On Wed, Jul 31, 2024 at 1:19 PM Hao Peng <flyingpenghao@xxxxxxxxx> wrote: > > > So if anything you could check list_empty(&kvm->arch.active_mmu_pages) > > > before the loop of kvm_zap_obsolete_pages(), similar to what is done in > > > kvm_mmu_zap_oldest_mmu_pages(). I doubt it can have any practical > > > benefit, though. > > > > I did some tests, when ept=0, kvm_zap_obsolete_pages was called 42 > > times, and only 17 times > > active_mmu_page list was not empty. When tdp_mmu was enabled, > > active_mmu_page list > > was always empty. > > Did you also test with nested virtual machines running? > yes, have similar results. > In any case, we're talking of a difference of about 100 instructions > at most, so it's irrelevant. > > Paolo >