summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* add test for aio poll and io_pgeteventsaio-pollChristoph Hellwig2018-01-161-0/+149
| | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* add support for io_pgeteventsChristoph Hellwig2018-01-167-4/+126
| | | | | | | | | | | | | | | | | | 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>
* move the aio_ring defintion and empty check into a headerChristoph Hellwig2018-01-162-25/+52
| | | | Signed-off-by: Christoph Hellwig <hch@lst.de>
* provide a generic io_syscall6Christoph Hellwig2018-01-161-0/+7
| | | | | | | | | 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>
* resurrect aio poll supportChristoph Hellwig2018-01-161-3/+1
| | | | | | | | 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>
* syscall: get rid of custom syscall implementationsyscall-refactorJeff Moyer2018-01-1211-892/+34
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* syscall-generic: don't overwrite errnoJeff Moyer2018-01-121-4/+10
| | | | | | The io_* system calls should not touch errno. Fix it. Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* Add support for preadv2/pwritev2Jeff Moyer2017-12-142-1/+203
| | | | | | | | | | | 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>
* harness: add test for allocating aio-max-nr ioctxsJeff Moyer2017-07-071-0/+178
| | | | | | | | | 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>
* libaio: harness: fix build error due to linker search orderMauricio Faria de Oliveira2016-10-281-2/+2
| | | | | | | | | | | | 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>
* libaio: harness: fix build errors due to attribute warn_unused_resultMauricio Faria de Oliveira2016-10-282-2/+5
| | | | | | | | | | | | | 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>
* harness: add a test case for mremapJeff Moyer2015-07-011-0/+253
| | | | | | | | 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>
* harness: don't hardcode page sizeJeff Moyer2015-07-012-3/+1
| | | | | | | 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>
* Generic arch dectection for padding definesNathan Rossi2015-02-121-4/+12
| | | | | | | | | 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 two new tests to the test harnessJeff Moyer2014-09-093-1/+382
| | | | | | | | - 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>
* libaio-0.3.110-1libaio-0.3.110-1Jeff Moyer2014-01-241-1/+7
| | | | | | | - 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)
* man: remove bogus .1 pagesdevelJeff Moyer2013-03-115-191/+0
| | | | | | | | 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>
* man: remove the glibc aio man pagesJeff Moyer2013-03-0418-1940/+0
| | | | | | | | 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>
* add more archesMike Frysinger2013-02-051-2/+5
| | | | | | | 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>
* unify LE/BE 32/64bit logicMike Frysinger2013-02-051-40/+17
| | | | | | | | 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>
* respect CFLAGS in the test harness directoryJeff Moyer2013-01-311-1/+1
| | | | | | | 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>
* add a generic syscall() fallbackMike Frysinger2013-01-312-1/+31
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* respect CFLAGS/LDFLAGS build flagsMike Frysinger2013-01-311-2/+3
| | | | | | | Also delete unused ARCH variable. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* build system: respect AR/RANLIBMike Frysinger2013-01-311-3/+4
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* add .gitignoreMike Frysinger2013-01-311-0/+10
| | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> [JEM: added *~] Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* fix test case 16 to work on arm64Jeff Moyer2013-01-311-0/+10
| | | | | | | | 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>
* add arm64 (aarch64) supportJeff Moyer2013-01-313-0/+113
| | | | | | | | 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>
* fix the testsuite buildFabio M. Di Nitto2011-04-192-0/+8
| | | | | | -Werror tripped up on unchecked return codes in fedora. Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
* add sparc supportJeff Moyer2011-04-193-0/+113
| | | | | | | | | 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>
* Add in ARM architecture support.libaio-0.3.108Jeff Moyer2009-06-094-2/+135
| | | | | | | | | | | | | | 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.
* Instead of checking for __LP64__, the author of the test harnessJeff Moyer2009-06-091-2/+2
| | | | | | 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.
* Change Copyright: tag to License:.Jeff Moyer2009-06-031-1/+1
|
* - Fix the test harness (Rusty Russell)libaio.0-3-107.1Jeff Moyer2008-01-0916-55/+323
| | | | - Add eventfd support (Rusty Russell)
* fix date in changelog... it's 2006, now. ;)libaio.0-3-106.1Jeff Moyer2006-01-041-1/+1
|
* - Add a .proc directive for the ia64_aio_raw_syscall macro. This sounds a lotJeff Moyer2006-01-042-1/+9
| | | | | | | 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.
* - Add a .proc directive for the ia64 raw syscall macro.libaio.0-3-105.1Jeff Moyer2005-08-011-1/+4
|
* Initial problem description:Jeff Moyer2005-08-011-0/+1
| | | | | | | | | | | | | | | | 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.
* Add alpha variants to exclusivearchlibaio.0-3-104.1Jeff Moyer2005-04-011-1/+1
|
* - Add Alpha architecture support. (Sergey Tikhonov <tsv@solvo.ru>)Jeff Moyer2005-04-014-2/+216
|
* - Fix SONAME breakage. In changing file names around, I also changed thelibaio.0-3-103.1Jeff Moyer2005-01-252-7/+14
| | | | SONAME, which is a no no.
* - S390 asm had a bug; I forgot to update the clobber list. Lucky for me,libaio.0-3-102.1Jeff Moyer2004-10-142-42/+59
| | | | | newer compilers complain about such things. - Also update the s390 asm to look more like the new kernel variants.
* - Revert syscall return values to be -ERRNO. This was an inadvertant buglibaio.0-3-101.1Jeff Moyer2004-10-138-34/+375
| | | | | introduced when clobber lists changed. - add ppc64pseries and ppc64iseries to exclusivearch
* - Switch around the tests for _PPC_ and _powerpc64_ so that the ppc64libaio.0-3-100.1Jeff Moyer2004-09-142-6/+10
| | | | platforms get the right padding.
* bump rev for build.libaio.0-3-99.4Jeff Moyer2004-07-141-1/+9
|
* Backed out the 0.3.93 patch from daniel.libaio.0-3-99.3Jeff Moyer2004-03-302-28/+4
|
* bah. forgot to update spec file.libaio.0-3-99.1Jeff Moyer2004-03-301-2/+7
|
* o Fix header file to allow inclusion from c++ code.libaio.0-3-98.2Jeff Moyer2004-03-303-4/+44
| | | | | | 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.
* typoJeff Moyer2004-02-261-2/+5
|
* fix compile warninglibaio.0-3-98.1Jeff Moyer2004-02-261-2/+5
|
* get rid of compiler warningsJeff Moyer2004-02-261-0/+1
|