From: Paolo Bonzini Subject: Re: [PATCH 1/2] kvm: x86: export maximum number of mmu_page_hash collisions Date: Tue, 20 Dec 2016 10:55:35 +0100 Message-ID: <80c3211c-e7c2-208d-cf8c-45925d9bcbf6@redhat.com> References: <1482184705-127401-1-git-send-email-dmatlack@google.com> <91b68a42-5c38-9d22-89ae-4cc8c2ba4f1f@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Cc: rkrcmar@redhat.com To: David Hildenbrand , David Matlack , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37992 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932869AbcLTJzi (ORCPT ); Tue, 20 Dec 2016 04:55:38 -0500 In-Reply-To: <91b68a42-5c38-9d22-89ae-4cc8c2ba4f1f@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 20/12/2016 10:48, David Hildenbrand wrote: >> >> __clear_sp_write_flooding_count(sp); >> - trace_kvm_mmu_get_page(sp, false); >> - return sp; >> + created = false; > > Simply doing > > if (collisions > vcpu->kvm->stat.max_mmu_page_hash_collisions) > vcpu->kvm->stat.max_mmu_page_hash_collisions = collisions; > > at this point saves a local variable, a jump label and keeps this patch > minimal. How so? There is a "break" above. Paolo