Page MenuHomeFreeBSD

Make p1003_1b.aio_listio_max a tunable
ClosedPublic

Authored by asomers on Jul 14 2017, 4:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 17 2024, 6:14 PM
Unknown Object (File)
Oct 17 2024, 6:14 PM
Unknown Object (File)
Oct 17 2024, 5:37 PM
Unknown Object (File)
Oct 17 2024, 2:53 AM
Unknown Object (File)
Oct 17 2024, 2:52 AM
Unknown Object (File)
Oct 17 2024, 2:52 AM
Unknown Object (File)
Oct 3 2024, 6:37 PM
Unknown Object (File)
Sep 11 2024, 2:25 PM
Subscribers

Details

Summary

Make 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.

Test Plan

sys/aio/lio_kqueue_test with different values for IOCBS_PER_LIO and
p1003_1b.aio_listio_max

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/kern/posix4_mib.c
80 ↗(On Diff #30790)

Even though this is not enabled, probably best to still add the macro here as well. Eventually we should probably just remove the disabled code.

sys/kern/vfs_aio.c
393 ↗(On Diff #30790)

Blank line before comment (bde@ would probably say the comment is banal and can just be removed)

418 ↗(On Diff #30790)

Add missing spaces around '*' while here.

1955 ↗(On Diff #30790)

I'd rather make aio_listio_max a static global variable in vfs_aio.c and not call p31b_getcfg() in all these places.

2161 ↗(On Diff #30790)

Extra blank line?

asomers marked 5 inline comments as done.

Store aio_listio_max as a static variable in vfs_aio.c instead of in
posix4_mib.c's facility array.

sys/kern/vfs_aio.c
172 ↗(On Diff #30885)

Hmm, I think I do like this approach and would be a fan of moving all the AIO-related MIBs into this file. However, I think it would be useful to check in with kib@ and possibly bde@ before moving away from p1b_*().

kib added a subscriber: kib.

I am fine with the move of all aio-related sysctls.

This revision is now accepted and ready to land.Aug 3 2017, 4:12 PM
This revision was automatically updated to reflect the committed changes.