From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36374 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEPhF-0006eP-7m for qemu-devel@nongnu.org; Tue, 18 May 2010 12:31:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEPhC-0006nV-5a for qemu-devel@nongnu.org; Tue, 18 May 2010 12:31:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49004 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEPhB-0006n1-SB for qemu-devel@nongnu.org; Tue, 18 May 2010 12:31:06 -0400 Message-ID: <4BF2C0C8.5070909@suse.de> Date: Tue, 18 May 2010 18:31:04 +0200 From: Alexander Graf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structure References: <1273873950-25756-1-git-send-email-stefanha@linux.vnet.ibm.com> <4BF2B64A.4080709@redhat.com> <4BF2BFA5.9000303@suse.de> <4BF2C05D.70102@codemonkey.ws> In-Reply-To: <4BF2C05D.70102@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jes Sorensen , Stefan Hajnoczi , qemu-devel@nongnu.org Anthony Liguori wrote: > On 05/18/2010 11:26 AM, Alexander Graf wrote: >> Jes Sorensen wrote: >> >>> On 05/14/10 23:52, Stefan Hajnoczi wrote: >>> >>> >>>> The VirtIOBlockRequest structure is about 40 KB in size. This patch >>>> avoids zeroing every request by only initializing fields that are >>>> read. >>>> The other fields are either written to or may not be used at all. >>>> >>>> Oprofile shows about 10% of CPU samples in memset called by >>>> virtio_blk_alloc_request(). The workload is >>>> dd if=/dev/vda of=/dev/null iflag=direct bs=8k running concurrently 4 >>>> times. This patch makes memset disappear to the bottom of the >>>> profile. >>>> >>>> Signed-off-by: Stefan Hajnoczi >>>> >>>> >>> Great catch! >>> >>> I ran some benchmarks using a ramdisk passed to the guest as a virtio >>> device and with this patch I saw improvements ranging from 5-20%. I >>> believe the fluctuations are due to not being able to numa bind it due >>> to limited memory. >>> >>> However a win all the way round! >>> >>> >> It looks like a fairly small change with a huge win. Sounds like a >> perfect candidate for 0.12.5 to me. >> > > I'd prefer to stick to bug fixes for stable releases. Performance > improvements are a good motivation for people to upgrade to 0.13 :-) In general I agree, but this one looks like a really simple one. Alex