| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is ppoll/pselect equivalent for io_getevents. It atomically executes
the following sequence:
sigset_t origmask;
pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
ret = io_getevents(ctx, min_nr, nr, events, timeout);
pthread_sigmask(SIG_SETMASK, &origmask, NULL);
And thus allows to safely mix aio and signals, especially together with
IO_CMD_POLL. See the pselect(2) man page for a more detailed explanation.
Signed-off-by: Christoph Hellwig <hch@lst.de>
[JEM: add sigset size parameter to io_pgetevents]
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
| |
Signed-off-by: Christoph Hellwig <hch@lst.de>
|
|
|
|
|
|
|
|
|
| |
This allows to call a 6-argument syscall using the generic syscall()
function from libc.
Signed-off-by: Christoph Hellwig <hch@lst.de>
[JEM: actually pass arg6]
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
| |
Now that we have poll support in mainline, remove comments about the
do not use status.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Maintaining the custom system call code for each architecture
is a burden. I'm not convinced that we have clobber registers
correct, and at best, we are just duplicating work that has
already been done by the glibc maintainers.
I asked Ben what the reasoning was behind not just using syscall.
This was his answer:
The main issue was that glibc's pthreads implementation really
sucked back during initial development and there was a use-case
for having the io_XXX functions usable directly from clone()ed
threads that didn't have all the glibc pthread state setup for
per-cpu areas to handle per-thread errno. That made sense back
then, but is rather silly today.
This patch gets rid of the architecture specific system call
wrappers in favor of using syscall(). We leave the per-arch
header files with the syscall numbers because we'll be adding
a new system call soon, and this will allow us to add the
new number without requiring newer kernels on build servers.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
| |
The io_* system calls should not touch errno. Fix it.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
preadv2 and pwritev2 allow the caller to specify per-io flags.
The main driver for this support in libaio is RWF_NOWAIT, which
allows applications to specify that they don't want the submission
thread to block waiting for things such as page cache invalidation,
block instantiation, etc. This should help reduce unexpected
latencies in the submission path.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Ensure that a user is able to allocate aio-max-nr events, even
if they are spread out 1 to an io_context. This test code is
based on a reproducer posted by Mauricio Faria de Oliveira
<mauricfo@linux.vnet.ibm.com>.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move '-lpthread' after 'main.c' in the compiler command line, so that
the linker can search unresolved symbols from the test in the library.
cases/18.t:98: undefined reference to `pthread_create'
cases/18.t:103: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the following build errors:
cases/18.t:94:2: error: ignoring return value of 'write', declared with attribute warn_unused_resultg [-Werror=unused-result]
write(fd, buffer, PAGE_SIZE);
cases/8.t:17:4: error: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Werror=unused-result]
ftruncate(fd, 0);
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
| |
Checkpoint/Restart in userspace requires support for remapping the
aio ring buffer. cases/19.t was added to ensure that this remapping
works.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
| |
18.t hard-coded PAGE_SIZE to 4096. This patch passes the PAGE_SIZE
in from the Makefile.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When available use the GNU C defines for endian and bitwidth to
determine the padding required. This reduces the need to define the
padding selection for every architecture.
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
| |
- Add a test for ring buffer overflows from Dan Aloni.
- Add a test that ensures io_getevents waits for I/O completions from
Anatol Pomozov.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
| |
- Add suport for sparc and arm64 (Mike Frysinger and Jeff Moyer)
- Add generic syscall fallbacks (Mike Frysinger)
- Update man pages (Jeff Moyer and Cyril Hrubis)
- Build system fixes (Mike Frysinger)
|
|
|
|
|
|
|
|
| |
I have no idea why there would ever be man pages in section 1 for
the libaio routines, so let's get rid of them. Note that they
were often incomplete and/or wrong.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
| |
These pages are not maintained here, and they don't describe any
functions this library provides, so let's get rid of them.
Reported-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
| |
Fill in a lot of the embedded/uncommon arches.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
| |
No point in duplicating the bodies of the #if statements when we can
just merge the #if checks together.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
| |
This is useful when, for example, testing the compat layer by
building -m32 on a 64 bit platform.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
| |
Also delete unused ARCH variable.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
[JEM: added *~]
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
| |
aarch64 does not implement "legacy" system calls such as eventfd. It
does, of course, support eventfd2, so use that instead.
Reported-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
| |
The libaio.h changes came from Riku Voipio <riku.voipio@linaro.org>.
The syscall-arm64.h file is an adapter version of the syscall-arm.h
file.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
| |
-Werror tripped up on unchecked return codes in fedora.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This patch came from the sparc linux port originally, modified by me
to fix the return codes from the system calls. This has not yet
been tested, but the fedora sparc port should be able to get me
the results from make check.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This support was taken from the Debian package:
http://patch-tracking.debian.net/patch/series/view/libaio/0.3.106-3/00_arches.patch
Kedar Sovani tested this on the following processor:
Processor : Feroceon 88FR571-vd rev 0 (v5l)
by running the libaio test harness. All tests passed. I also ran the
test harness on a qemu emulated system, and all tests that I could run
passed. Due to a bug in qemu, I could not configure a system with enough
memory to run 2 of the tests. aio-dio-regress also passed testing on the
emulated system.
|
|
|
|
|
|
| |
decided to check for __i386__ when deciding whether pointers should
be 32 or 64 bits. I've fixed this so that the tests build and run
properly on 32 bit platforms other than i386.
|
| |
|
|
|
|
| |
- Add eventfd support (Rusty Russell)
|
| |
|
|
|
|
|
|
|
| |
like the previous entry, but that one fixed the __ia64_raw_syscall macro,
located in syscall-ia64.h. This macro is in raw_syscall.c, which pretty much
only exists for ia64. This bug prevented the package from building with
newer version of gcc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have an application that optionally can use kernel async IO (libaio.so).
As this is optional, I don't want to link the application with -laio, as
otherwise all users have to install libaio RPM.
Therefore, I'm loading libaio.so at runtime via dlopen(), and get the
required function addresses via dlvsym(). Basically, I need io_queue_init(),
io_submit(), and io_getevents().
This works fine on all supported platforms except IA64.
It turns out the __ia64_raw_syscall macro did not include a .proc directive,
which was causing this problem. The fix is to simply add a one line
change to that macro.
|
| |
|
| |
|
|
|
|
| |
SONAME, which is a no no.
|
|
|
|
|
| |
newer compilers complain about such things.
- Also update the s390 asm to look more like the new kernel variants.
|
|
|
|
|
| |
introduced when clobber lists changed.
- add ppc64pseries and ppc64iseries to exclusivearch
|
|
|
|
| |
platforms get the right padding.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
o Fix compatibility routines, thanks to Daniel @ osdl.
o Shared library is now libaio.so.1.0.0 and links are created for
libaio.so.1 and libaio.so.
|
| |
|
| |
|
| |
|