From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v4] kvm: Fix page ageing bugs Date: Tue, 23 Sep 2014 19:05:21 +0200 Message-ID: <5421A851.70403@redhat.com> References: <1411410865-3603-1-git-send-email-andreslc@google.com> <1411422882-16245-1-git-send-email-andreslc@google.com> <542125F1.3080607@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Radim Krcmar , Rik van Riel , Andrew Morton , Andrea Arcangeli , Peter Feiner , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andres Lagar-Cavilla To: Andres Lagar-Cavilla Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org List-Id: kvm.vger.kernel.org Il 23/09/2014 19:04, Andres Lagar-Cavilla ha scritto: > I'm not sure. The addition is not always by PAGE_SIZE, since it > depends on the current level we are iterating at in the outer > kvm_handle_hva_range(). IOW, could be PMD_SIZE or even PUD_SIZE, and > is_large_pte() enough to tell? > > This is probably worth a general fix, I can see all the callbacks > benefiting from knowing the gfn (passed down by > kvm_handle_hva_range()) without any additional computation, and adding > that to a tracing call if they don't already. > > Even passing the level down to the callback would help by cutting down > to one arithmetic op (subtract rmapp from slot rmap base pointer for > that level) You're right. Let's apply this patch and work on that as a follow-up. Paolo -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org