Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2008 09:51:33 -0500
From:      Anthony Liguori <anthony@codemonkey.ws>
To:        Juergen Lock <nox@jelal.kn-bremen.de>
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)
Message-ID:  <48E23CF5.4000805@codemonkey.ws>
In-Reply-To: <200809272252.m8RMq4fu057049@saturn.kn-bremen.de>
References:  <20080921204025.GA81055@saturn.kn-bremen.de>	<cd6b4a5b0809230639x27e94477k315796c2cfb650f2@mail.gmail.com>	<200809242210.m8OMAcSZ021572@saturn.kn-bremen.de>	<cd6b4a5b0809241954p159dd86u17fdc2a485008e7d@mail.gmail.com>	<48DCF9FC.2070708@codemonkey.ws>	<20080926220445.GA13099@saturn.kn-bremen.de> <200809272252.m8RMq4fu057049@saturn.kn-bremen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48E23CF5.4000805>