From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvoqR-00058A-9J for qemu-devel@nongnu.org; Thu, 08 Oct 2009 04:59:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvoqM-00056y-1d for qemu-devel@nongnu.org; Thu, 08 Oct 2009 04:59:30 -0400 Received: from [199.232.76.173] (port=53869 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvoqL-00056r-QL for qemu-devel@nongnu.org; Thu, 08 Oct 2009 04:59:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49995) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvoqL-0004Cd-C1 for qemu-devel@nongnu.org; Thu, 08 Oct 2009 04:59:25 -0400 Date: Thu, 8 Oct 2009 10:57:20 +0200 From: "Michael S. Tsirkin" Message-ID: <20091008085720.GB5269@redhat.com> References: <20091007123348.GA31537@redhat.com> <4ACC9133.9060903@redhat.com> <20091007134853.GA9769@redhat.com> <4ACCA4AD.7050606@redhat.com> <20091007192127.GA3796@redhat.com> <4ACDA18D.809@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ACDA18D.809@redhat.com> Subject: [Qemu-devel] Re: [PATCH] qemu/pci: optimize pci config handling List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Isaku Yamahata , qemu-devel@nongnu.org On Thu, Oct 08, 2009 at 10:23:41AM +0200, Paolo Bonzini wrote: > >>>> What you porpose here is certainly more code than we had. >>>> So why is this a good idea? >>> >>> Because it avoids the memcpy/memcmp most of the time (when the memcmp >>> would surely succeed). >> >> Yes :) But at the cost of more code. I don't think speed >> matters there, so less code is good. > > Fine. > >>> I supposed that would also matter more as the >>> config space size increases---correct me and dismiss the patch if I am >>> mistaken. >> >> No, we'll always only look need to look at the header, whatever the size >> of the config space. That's the point of the patch I posted - future >> proof against config space size increases, not optimization. > > But fewer reads on average will not modify the header, so there will be > even fewer memcpy with my patch when the config space will be 4k. Oh, I see. I was worrying about us adding some side effect where you write into PCI extended register and header changes. Maybe that won't ever happen. > Paolo