Page MenuHomeFreeBSD

aio: micro-optimize the lio_opcode assignments
ClosedPublic

Authored by asomers on Jan 3 2021, 3:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 7 2024, 6:10 PM
Unknown Object (File)
Feb 8 2024, 7:41 PM
Unknown Object (File)
Feb 8 2024, 7:41 PM
Unknown Object (File)
Jan 29 2024, 9:19 AM
Unknown Object (File)
Dec 10 2023, 11:35 PM
Unknown Object (File)
Nov 27 2023, 11:10 AM
Unknown Object (File)
Nov 9 2023, 3:11 PM
Unknown Object (File)
Nov 4 2023, 9:13 PM
Subscribers

Details

Summary

This allows slightly more efficient opcode testing in-kernel. It is
transparent to userland, except to applications that sneakily submit
aio fsync or aio mlock operations via lio_listio, which has never been
documented, requires the use of deliberately undefined constants
(LIO_SYNC and LIO_MLOCK), and is arguably a bug.

Test Plan

existing AIO test suite

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 36188
Build 33077: arc lint + arc unit

Event Timeline

Looks OK to me. I suppose we could also use bitmask style for LIO_SYNC and LIO_DATA_ONLY?

This seems ok to me, though it's not clear if the optimizations really buy anything in perf compared to the (minimal) obfuscation when reading.

I would very much like to see missing validation of opcodes to lio_listio added though, perhaps as a prior commit before this?

  • aio: micro-optimize the lio_opcode assignments
  • Rebase to include LIO_DSYNC

I rebased. I'll open a separate review to validate lio_listio opcodes.

  • aio: micro-optimize the lio_opcode assignments
  • Rebase to include LIO_DSYNC

Rebased to include lio_listio opcode validation.

This revision is now accepted and ready to land.Jan 19 2021, 6:53 PM