From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/3] KVM: MMU: Separate trivial NULL check out from rmap_get_next() Date: Thu, 15 Mar 2012 11:49:17 +0200 Message-ID: <4F61BB1D.6050209@redhat.com> References: <20120315181856.2ced0a28.yoshikawa.takuya@oss.ntt.co.jp> <20120315182127.07600c50.yoshikawa.takuya@oss.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:19374 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010Ab2COJtX (ORCPT ); Thu, 15 Mar 2012 05:49:23 -0400 In-Reply-To: <20120315182127.07600c50.yoshikawa.takuya@oss.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On 03/15/2012 11:21 AM, Takuya Yoshikawa wrote: > Checking wheter iter->desc is NULL is not worth a function call > especially when we use EPT/NPT because we know it would almost always > be NULL. > > Although using "inline" like this does not look clean, we could see > measurable performance improvements: get_dirty_log for 1GB dirty memory > became faster by more than 10% on my test box. > WOW. I'd have assumed the processor deals better with this; it should be 100% predicted branches. But I won't argue with cold data. -- error compiling committee.c: too many arguments to function