summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2017-11-28 17:04:22 +0000
committerasomers <asomers@FreeBSD.org>2017-11-28 17:04:22 +0000
commit9c697283c1d73d38e8fba4e8802b319210ec1f28 (patch)
tree767cc312f4ae42a520e123d2dba5e98bc2abc67a /lib
parentb7b345810f6a98fe614c95438c4cfe57d23b8a3d (diff)
downloadFreeBSD-src-9c697283c1d73d38e8fba4e8802b319210ec1f28.zip
FreeBSD-src-9c697283c1d73d38e8fba4e8802b319210ec1f28.tar.gz
MFC r322258, r324941, r324956, r325018
r322258: Make p1003_1b.aio_listio_max a tunable p1003_1b.aio_listio_max is now a tunable. Its value is reflected in the sysctl of the same name, and the sysconf(3) variable _SC_AIO_LISTIO_MAX. Its value will be bounded from below by the compile-time constant AIO_LISTIO_MAX and from above by the compile-time constant MAX_AIO_QUEUE_PER_PROC and the tunable vfs.aio.max_aio_queue. Reviewed by: jhb, kib Relnotes: yes Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D11601 r324941: Remove artificial restriction on lio_listio's operation count In r322258 I made p1003_1b.aio_listio_max a tunable. However, further investigation shows that there was never any good reason for that limit to exist in the first place. It's used in two completely different ways: * To size a UMA zone, which globally limits the number of concurrent aio_suspend calls. * To artifically limit the number of operations in a single lio_listio call. There doesn't seem to be any memory allocation associated with this limit. This change does two things: * Properly names aio_suspend's UMA zone, and sizes it based on a new constant. * Eliminates the artifical restriction on lio_listio. Instead, lio_listio calls will now be limited by the more generous max_aio_queue_per_proc. The old p1003_1b.aio_listio_max is now an alias for vfs.aio.max_aio_queue_per_proc, so sysconf(3) will still work with _SC_AIO_LISTIO_MAX. Reported by: bde Reviewed by: jhb Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12120 r324956: Bump man page revision dates for r324941 Reported by: jhb X-MFC-with: 324941 Sponsored by: Spectra Logic Corp r325018: Fix aio_suspend in 32-bit emulation An off-by-one error has been present since the system call was first present in 185878. It additionally became a memory corruption bug after change 324941. The failure is actually revealed by our existing AIO tests. However, apparently nobody's been running those in 32-bit emulation mode. Reported by: Coverity, cem CID: 1382114 X-MFC-With: 324941 Sponsored by: Spectra Logic Corp
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/aio_suspend.210
-rw-r--r--lib/libc/sys/lio_listio.26
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/sys/aio_suspend.2 b/lib/libc/sys/aio_suspend.2
index 0ff25f5..be6d7e1 100644
--- a/lib/libc/sys/aio_suspend.2
+++ b/lib/libc/sys/aio_suspend.2
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 2, 1999
+.Dd Oct 23, 2017
.Dt AIO_SUSPEND 2
.Os
.Sh NAME
@@ -85,10 +85,10 @@ expired before any I/O requests completed.
The
.Fa iocbs
argument
-contains more than
-.Dv AIO_LISTIO_MAX
-asynchronous I/O requests, or at least one of the requests is not
-valid.
+contains more asynchronous I/O requests than the
+.Va vfs.aio.max_aio_queue_per_proc
+.Xr sysctl 8
+variable, or at least one of the requests is not valid.
.It Bq Er EINTR
the suspend was interrupted by a signal.
.El
diff --git a/lib/libc/sys/lio_listio.2 b/lib/libc/sys/lio_listio.2
index ae228f7..abc9f0c 100644
--- a/lib/libc/sys/lio_listio.2
+++ b/lib/libc/sys/lio_listio.2
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 15, 2016
+.Dd Oct 23, 2017
.Dt LIO_LISTIO 2
.Os
.Sh NAME
@@ -161,7 +161,7 @@ function will fail if:
There are not enough resources to enqueue the requests.
.It Bq Er EAGAIN
The request would cause the system-wide limit
-.Dv AIO_MAX
+.Dv {AIO_MAX}
to be exceeded.
.It Bq Er EINVAL
The
@@ -173,7 +173,7 @@ nor
or
.Fa nent
is greater than
-.Dv AIO_LISTIO_MAX .
+.Dv {AIO_LISTIO_MAX} .
.It Bq Er EINVAL
The asynchronous notification method in
.Fa sig->sigev_notify
OpenPOWER on IntegriCloud