From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50180 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEPcX-00046k-Vp for qemu-devel@nongnu.org; Tue, 18 May 2010 12:26:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEPcV-00061m-Va for qemu-devel@nongnu.org; Tue, 18 May 2010 12:26:17 -0400 Received: from cantor.suse.de ([195.135.220.2]:49638 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEPcV-00061c-Q6 for qemu-devel@nongnu.org; Tue, 18 May 2010 12:26:15 -0400 Message-ID: <4BF2BFA5.9000303@suse.de> Date: Tue, 18 May 2010 18:26:13 +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> In-Reply-To: <4BF2B64A.4080709@redhat.com> 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: Jes Sorensen Cc: Stefan Hajnoczi , qemu-devel@nongnu.org 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. Alex