From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwGJk-0005Dp-Dw for qemu-devel@nongnu.org; Tue, 31 Jul 2012 13:33:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwGJi-0001gZ-O0 for qemu-devel@nongnu.org; Tue, 31 Jul 2012 13:33:12 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:10042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwGJi-0001fs-He for qemu-devel@nongnu.org; Tue, 31 Jul 2012 13:33:10 -0400 Received: from eusync4.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8100K81CS776A0@mailout4.w1.samsung.com> for qemu-devel@nongnu.org; Tue, 31 Jul 2012 18:33:43 +0100 (BST) Received: from [106.109.9.180] by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M8100877CR3FQ20@eusync4.samsung.com> for qemu-devel@nongnu.org; Tue, 31 Jul 2012 18:33:05 +0100 (BST) Message-id: <501816D0.9040207@samsung.com> Date: Tue, 31 Jul 2012 21:33:04 +0400 From: Igor Mitsyanko MIME-version: 1.0 References: <1343417387-13953-1-git-send-email-i.mitsyanko@samsung.com> <1343417387-13953-11-git-send-email-i.mitsyanko@samsung.com> In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V4 10/12] SD card users: optimize access to SDClass methods List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: kwolf@redhat.com, Anthony Liguori , benoit.canet@gmail.com, wdongxu@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, e.voevodin@samsung.com, qemu-devel@nongnu.org, armbru@redhat.com, andrew.zaborowski@intel.com, kyungmin.park@samsung.com, pbonzini@redhat.com On 07/31/2012 07:43 PM, Peter Maydell wrote: > On 27 July 2012 20:29, Igor Mitsyanko wrote: >> Rather that repeatedly call SD_GET_CLASS() in a loop, call it once before >> a loop starts. > Anthony claims that SD_GET_CLASS should be cheap enough that we don't > need to hoist it out of loops like this. Do you have profiling data > or similar that caused you to write this patch? > > -- PMM > Well, I've tested it by measuring an execution time of a 4Kb write to SD card, results showed that arithmetic mean of time for one 4k write was less by ~300us in sequence with SD_GET_CLASS extracted from the loop. Although I ran this test several times, I have little faith in test methodology and results, it obviously showed significant dispersion between measured time of distinct 4K writes (200-300% if I recall correctly). I really have no objection no objection to dropping this patch.