On 20/12/2016 10:58, David Hildenbrand wrote: > Am 20.12.2016 um 10:55 schrieb Paolo Bonzini: >> >> >> 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. >> > > Keeping the same at the end of the function / (even better directly > after the for loop) of course. Then the question is whether a goto is better or worse than code duplication. Here I don't see the point in introducing the created bool and factoring the call to trace_kvm_mmu_get_page, but on the other hand a single "out" label makes sense. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html