freebsd kernel with SKQ
Go to file
Alexander Leidinger 6a1162d4cd MFP4 (with some minor changes):
Implement the linux_io_* syscalls (AIO). They are only enabled if the native
AIO code is available (either compiled in to the kernel or as a module) at
the time the functions are used. If the AIO stuff is not available there
will be a ENOSYS.

From the submitter:
---snip---
DESIGN NOTES:

1. Linux permits a process to own multiple AIO queues (distinguished by
   "context"), but FreeBSD creates only one single AIO queue per process.
   My code maintains a request queue (STAILQ of queue(3)) per "context",
   and throws all AIO requests of all contexts owned by a process into
   the single FreeBSD per-process AIO queue.

   When the process calls io_destroy(2), io_getevents(2), io_submit(2) and
   io_cancel(2), my code can pick out requests owned by the specified context
   from the single FreeBSD per-process AIO queue according to the per-context
   request queues maintained by my code.

2. The request queue maintained by my code stores contrast information between
   Linux IO control blocks (struct linux_iocb) and FreeBSD IO control blocks
   (struct aiocb). FreeBSD IO control block actually exists in userland memory
   space, required by FreeBSD native aio_XXXXXX(2).

3. It is quite troubling that the function io_getevents() of libaio-0.3.105
   needs to use Linux-specific "struct aio_ring", which is a partial mirror
   of context in user space. I would rather take the address of context in
   kernel as the context ID, but the io_getevents() of libaio forces me to
   take the address of the "ring" in user space as the context ID.

   To my surprise, one comment line in the file "io_getevents.c" of
   libaio-0.3.105 reads:

             Ben will hate me for this

REFERENCE:

1. Linux kernel source code:   http://www.kernel.org/pub/linux/kernel/v2.6/
   (include/linux/aio_abi.h, fs/aio.c)

2. Linux manual pages:         http://www.kernel.org/pub/linux/docs/manpages/
   (io_setup(2), io_destroy(2), io_getevents(2), io_submit(2), io_cancel(2))

3. Linux Scalability Effort:   http://lse.sourceforge.net/io/aio.html
   The design notes:           http://lse.sourceforge.net/io/aionotes.txt

4. The package libaio, both source and binary:
       http://rpmfind.net/linux/rpm2html/search.php?query=libaio
   Simple transparent interface to Linux AIO system calls.

5. Libaio-oracle:              http://oss.oracle.com/projects/libaio-oracle/
   POSIX AIO implementation based on Linux AIO system calls (depending on
   libaio).
---snip---

Submitted by:	Li, Xiao <intron@intron.ac>
2006-10-15 14:22:14 +00:00
bin - Improve description of the -A option. 2006-10-12 10:08:52 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r163356, 2006-10-14 19:50:57 +00:00
crypto Don't define XAUTH_PATH here, we either pass it in on the compiler command 2006-10-06 14:27:26 +00:00
etc RC script for idmapd(8), defaulting to off. 2006-10-15 14:19:06 +00:00
games Add a tip on "how to strip UTF-8 BOM" 2006-10-09 04:11:34 +00:00
gnu Update the FILES section which has been wrong for some time. 2006-10-15 11:50:11 +00:00
include A GEOM cache can speed up read performance by sending fixed size 2006-10-06 08:27:07 +00:00
kerberos5 Kerberos/Heimdal doesn't really depend on the INET6 macro. 2006-07-28 06:33:27 +00:00
lib Moved __BEGIN_DECLS up a little so that it covers __test_sse() and C++ 2006-10-14 20:35:56 +00:00
libexec Fix TLS on sparc64 for statically and dynamically linked binaries 2006-10-08 02:50:34 +00:00
release New release notes: mrouted(8) de-orbit. 2006-10-14 13:46:00 +00:00
rescue Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
sbin Hook up idmapd to the build, as the NFS4 client is not much use without 2006-10-15 14:04:28 +00:00
secure Fix static compilation. 2006-10-07 17:32:05 +00:00
share Explain that using 64bit arguments on 32bit architectures with CTRx() 2006-10-15 12:40:27 +00:00
sys MFP4 (with some minor changes): 2006-10-15 14:22:14 +00:00
tools Might as well move to the right place if we are not there. 2006-10-11 21:46:53 +00:00
usr.bin Document that unexpand(1)'s -a and -t options are exclusive. 2006-10-13 16:22:25 +00:00
usr.sbin - Before doing ioctl(SIOCGIFNETMASK) put the proper IP address into the ifreq, 2006-10-13 12:38:43 +00:00
COPYRIGHT Happy new year, a little late 2006-01-15 22:06:10 +00:00
LOCKS Document commit constraints for RELENG_6_*. 2006-01-13 06:51:43 +00:00
MAINTAINERS Add myself as OpenSSL janitor/maintainer. 2006-09-11 19:39:46 +00:00
Makefile In "make universe", utilize simplified cross-build synopsis, 2006-09-08 10:13:15 +00:00
Makefile.inc1 buildworld fixes for sun4v 2006-10-09 04:58:45 +00:00
ObsoleteFiles.inc Note the move of libpcap.so.4 and libpthread.so.2 (libthr.so.2 2006-10-01 17:48:43 +00:00
README Simply running ``make world'' will bomb unless you dig up the 2006-06-07 03:33:48 +00:00
UPDATING The ioctl(2) API has changed, and some ioctl command codes too. 2006-09-30 20:01:15 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html