From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 30 14:52:38 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9F9910656A6 for ; Tue, 30 Sep 2008 14:52:38 +0000 (UTC) (envelope-from anthony@codemonkey.ws) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id 21E7A8FC19 for ; Tue, 30 Sep 2008 14:52:37 +0000 (UTC) (envelope-from anthony@codemonkey.ws) Received: by gxk10 with SMTP id 10so11627335gxk.19 for ; Tue, 30 Sep 2008 07:52:37 -0700 (PDT) Received: by 10.100.41.11 with SMTP id o11mr5994823ano.144.1222786357021; Tue, 30 Sep 2008 07:52:37 -0700 (PDT) Received: from squirrel.codemonkey.ws (cpe-24-28-0-183.austin.res.rr.com [24.28.0.183]) by mx.google.com with ESMTPS id d12sm3238382and.6.2008.09.30.07.52.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 30 Sep 2008 07:52:36 -0700 (PDT) Message-ID: <48E23CF5.4000805@codemonkey.ws> Date: Tue, 30 Sep 2008 09:51:33 -0500 From: Anthony Liguori User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: Juergen Lock References: <20080921204025.GA81055@saturn.kn-bremen.de> <200809242210.m8OMAcSZ021572@saturn.kn-bremen.de> <48DCF9FC.2070708@codemonkey.ws> <20080926220445.GA13099@saturn.kn-bremen.de> <200809272252.m8RMq4fu057049@saturn.kn-bremen.de> In-Reply-To: <200809272252.m8RMq4fu057049@saturn.kn-bremen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org, qemu-devel@nongnu.org Subject: Re: [Qemu-devel] Re: qemu svn r5281 on FreeBSD - slow usb, vmwarevga, screen updates... (now updated to r5313) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2008 14:52:38 -0000 Juergen Lock wrote: > In article <48DE5256.5000101@codemonkey.ws> you write: > >> [...] >> > > >>>> The one thing that really tripped me up with the whole aio kld-module >>>> thing. Perhaps we should detect the presence of the module at run time and >>>> disable aio? I assume kldload can only be run as root? >>>> >>>> >>> Yes. Atm the ports print a warning when aio is not loaded: >>> >>> >> Yeah, I don't think this is enough. I'd rather see AIO be disabled when >> modfind("aio") is not available (printing a warning along with that >> would be fine). A non-privileged user cannot load the aio module so >> it's not very useful to tell them to load it. >> > > OK so how about the following? (only tested with a raw image, but if > the way its disabled for OpenBSD works for all of them this should as well.) > > Oh and am I right qemu-img doesn't use aio? If it actually does we may > want to add the same check there instead of just disabling it. (I kept it > enabled for qemu-nbd since thats not built on FreeBSD anyway.) > Disabling aio for everyone is not the right thing if posix-aio is broken. What would be better is in block-raw-posix.c, to have a one type check of modfind() (if we're FreeBSD), and if it fails, set a flag that forces the aio routines to call bdrv_aio_{read,write}_em. Regards, Anthony Liguori