From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36087 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEPfX-0005us-J5 for qemu-devel@nongnu.org; Tue, 18 May 2010 12:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEPfV-0006Tz-PM for qemu-devel@nongnu.org; Tue, 18 May 2010 12:29:23 -0400 Received: from mail-qy0-f173.google.com ([209.85.221.173]:33401) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEPfV-0006Tv-MQ for qemu-devel@nongnu.org; Tue, 18 May 2010 12:29:21 -0400 Received: by qyk4 with SMTP id 4so1830170qyk.18 for ; Tue, 18 May 2010 09:29:21 -0700 (PDT) Message-ID: <4BF2C05D.70102@codemonkey.ws> Date: Tue, 18 May 2010 11:29:17 -0500 From: Anthony Liguori 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> In-Reply-To: <4BF2BFA5.9000303@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Jes Sorensen , Stefan Hajnoczi , qemu-devel@nongnu.org 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 :-) Regards, Anthony Liguori > Alex > > >