AIO in 10.0-RELEASE

Rick Miller vmiller at hostileadmin.com
Thu Apr 7 17:35:43 UTC 2016


On Thu, Apr 7, 2016 at 12:57 PM, Matthew Seaman <matthew at freebsd.org> wrote:

> On 2016/04/07 16:25, Rick Miller wrote:
> > Hi all,
> >
> > A user has been implementing AIO features in an application.  They assert
> > that, despite aio(4) stating that it is enabled either statically (with
> > VFS_AIO in the kernel config) or dynamically (kldload), in their
> > development environment there was no requirement for either of these
> > methods of enabling AIO.  My google-foo is failing me when it comes to
> > FreeBSD's AIO.
> >
> > This question defies logic, but is it possible that AIO works by default
> in
> > earlier versions of 10.0 and not in more recent version of 10.0 without
> any
> > local system changes?
> >
>
> You asked a pretty similar question last month, where one of the replies
> pointed you to this in the UPDATING file:
>
> 20160301:
>         The AIO subsystem is now a standard part of the kernel.  The
>         VFS_AIO kernel option and aio.ko kernel module have been removed.
>         Due to stability concerns, asynchronous I/O requests are only
>         permitted on sockets and raw disks by default.  To enable
>         asynchronous I/O requests on all file types, set the
>         vfs.aio.enable_unsafe sysctl to a non-zero value.
>
> In fact, that change was *after* 10.3 was branched, so 10.3-RELEASE
> should behave the same as 10.2 and earlier as far as AIO is concerned.
>
>
> https://svnweb.freebsd.org/base/releng/10.3/UPDATING?revision=297262&view=markup
>
> As far as I can tell from the manual, calls to aio_read(2) and similar
> functions should generate an ENOSYS error code, unless your system
> kernel has the aio module ceither compiled in or loaded.  Which runs
> counter to your user's experience.
>
> I suggest asking on freebsd-hackers at ... as you're more likely to come to
> the attention of the responsible developers there.
>

Thanks, Matthew...it is that UPDATING entry that caused the engineer to
perform additional testing.  The engineer's description of his observances
during testing explicitly called out that AIO was seemingly enabled in the
development environment despite not being enabled via kldload.  I'm
confident that AIO is not enabled in the kernel after verifying VFS_AIO was
not specified in the kernel config of the compiled distribution.  Thus the
question...I'll check freebsd-hackers.  Appreciate it.

-- 
Take care
Rick Miller


More information about the freebsd-questions mailing list