From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39857 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEJIV-0006Ww-Sb for qemu-devel@nongnu.org; Tue, 18 May 2010 05:41:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEJEu-0002sO-R4 for qemu-devel@nongnu.org; Tue, 18 May 2010 05:37:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64027) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEJEu-0002sF-I4 for qemu-devel@nongnu.org; Tue, 18 May 2010 05:37:28 -0400 Message-ID: <4BF25FB7.9020007@redhat.com> Date: Tue, 18 May 2010 11:36:55 +0200 From: Kevin Wolf 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> In-Reply-To: <1273873950-25756-1-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org Am 14.05.2010 23:52, schrieb Stefan Hajnoczi: > 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 Thanks, applied to the block branch. Kevin