]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r322258, r324941, r324956, r325018
authorasomers <asomers@FreeBSD.org>
Tue, 28 Nov 2017 17:04:22 +0000 (17:04 +0000)
committerasomers <asomers@FreeBSD.org>
Tue, 28 Nov 2017 17:04:22 +0000 (17:04 +0000)
commit9c697283c1d73d38e8fba4e8802b319210ec1f28
tree767cc312f4ae42a520e123d2dba5e98bc2abc67a
parentb7b345810f6a98fe614c95438c4cfe57d23b8a3d
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
lib/libc/sys/aio_suspend.2
lib/libc/sys/lio_listio.2
sys/kern/posix4_mib.c
sys/kern/vfs_aio.c