From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH kvm-unit-tests 2/4] Introduce a C++ wrapper for the kvm APIs Date: Sun, 28 Nov 2010 11:54:26 +0200 Message-ID: <4CF226D2.6030102@redhat.com> References: <1290595933-13122-1-git-send-email-avi@redhat.com> <1290595933-13122-3-git-send-email-avi@redhat.com> <20101126101625.GA3657@redhat.com> <4CF0CB9A.5060403@redhat.com> <20101128085833.GA3330@redhat.com> <4CF2215D.9060201@redhat.com> <20101128095056.GA4499@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32237 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751903Ab0K1Jya (ORCPT ); Sun, 28 Nov 2010 04:54:30 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAS9sTNS032084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 28 Nov 2010 04:54:30 -0500 In-Reply-To: <20101128095056.GA4499@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/28/2010 11:50 AM, Michael S. Tsirkin wrote: > > > > > >Another problem is that there seem to be two memory allocations and a > > >copy here, apparently just to simplify error handling. It might be fine > > >for this test but won't scale for when performance matters. > > > > When it matters, we can fix it. I don't see msr read/write becoming > > a hot path. > > It will be very painful to fix it. Why? One copy is necessary (it's due to the bad kvm API), but we can avoid the others. In any case the data will be copied by the kernel. > > > > > The compiler should optimize it away completely. > > Should as opposed to does. Want me to try a simple test? Please. > > There's been a lot > > of work in gcc on that. > > > > About compile times, I don't care much. > > I do. You will too when we have codebase that can be built as fast as > we commit things, so buildbot breaks. > This is common in C++ based projects. If kvm-unit-tests.git takes to long to compile, I'll be very happy. -- error compiling committee.c: too many arguments to function