Received: from eggs.gnu.org ([2001:4830:134:3::10]:55416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brQYI-0007aC-Gn for qemu-devel@nongnu.org; Tue, 04 Oct 2016 10:18:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brQYE-00015m-7a for qemu-devel@nongnu.org; Tue, 04 Oct 2016 10:18:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brQYE-00015P-1A for qemu-devel@nongnu.org; Tue, 04 Oct 2016 10:18:34 -0400 References: <1475580648-6470-1-git-send-email-lvivier@redhat.com> <1475580648-6470-2-git-send-email-lvivier@redhat.com> <4a11fc7e-ccec-2252-c356-a0ca3466bbf0@redhat.com> <912a8fc8-47bd-fffe-60ff-0cd7b006402c@redhat.com> <20161004133114.GL5578@redhat.com> From: Thomas Huth Message-ID: <44d24209-9901-be03-83fa-707ac12b29b4@redhat.com> Date: Tue, 4 Oct 2016 16:18:30 +0200 MIME-Version: 1.0 In-Reply-To: <20161004133114.GL5578@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] accel: allows to select the "best" accelerator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Paolo Bonzini , Laurent Vivier , Peter Maydell , "Michael S . Tsirkin" , =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org, Stefano Stabellini On 04.10.2016 15:31, Daniel P. Berrange wrote: > On Tue, Oct 04, 2016 at 02:49:21PM +0200, Thomas Huth wrote: >> On 04.10.2016 14:41, Paolo Bonzini wrote: >>> >>> >>> On 04/10/2016 13:30, Laurent Vivier wrote: >>>> But sometime, user wants to use a real accelerator without knowing >>>> if he really can, with, for instance accel=3Dkvm:tcg. >>>> In this case, and if the accelerator is not available we >>>> have a noisy "XXX accelerator not found". >>>> >>>> By allowing the user to ask the "best" accelerator for the given >>>> target, we can avoid this problem. >>>> >>>> This patch introduces a new parameter for the "accel" property, the >>>> "best" keyword. >>>> >>>> You can ask to use the best accelerator with "-M accel=3Dbest", >>>> or if you want to use your favorite accelerator and if it is not >>>> available, the best one, you can use, for instance >>>> "-M accel=3Dkvm:best". >>> >>> I don't think there's a single definition of a "best" accelerator. F= or >>> example, some "-cpu" features may be available only with TCG. In tha= t >>> case, "kvm:tcg" has a clear meaning ("kvm" if it exists, otherwise >>> "tcg") but "best" doesn't. >>> >>> I agree with Daniel that unit tests should use "tcg" exclusively, at >>> least as a default. >> >> Using only tcg has also some disadvantages: For some tests, it's >> interesting to know whether they also work properly with KVM (e.g. >> migration tests), and only using tcg by default slows down the "make >> check" quite a bit - which might become an issue now that we're adding >> more and more tests. >=20 > Which tests are you seeing a slow-down for ? Well, everything that is using accel=3Dtcg in tests/ could be accelerated= . For example, the new ipv6/ppc64 unit test is quite slow with TCG: sudo QTEST_QEMU_BINARY=3Dppc64-softmmu/qemu-system-ppc64 time tests/pxe-t= est 48.46user 0.07system 0:48.48elapsed If I replace the "accel=3Dtcg" with "accel=3Dkvm" in pxe-test.c, the test= runs much faster: 11.94user 0.38system 0:12.28elapsed Thomas