Page MenuHomeFreeBSD

Cleanups to the AIO kproc main loop.
ClosedPublic

Authored by jhb on Jan 18 2016, 11:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 19, 4:48 AM
Unknown Object (File)
Jul 14 2024, 4:08 PM
Unknown Object (File)
Jul 2 2024, 5:35 PM
Unknown Object (File)
Jun 28 2024, 12:05 AM
Unknown Object (File)
Jun 28 2024, 12:05 AM
Unknown Object (File)
Jun 25 2024, 1:50 PM
Unknown Object (File)
Jun 24 2024, 10:34 AM
Unknown Object (File)
Jun 24 2024, 9:58 AM
Subscribers

Details

Summary

Various cleanups to the main function for AIO kernel processes:

  • Pull the vmspace logic out into helper functions and reduce duplication. Operations on the vmspace are all isolated to vm_map.c, but it now exports a new 'vmspace_switch_aio' for use by AIO kernel processes.
  • When an AIO kernel process wants to exit, break out of the main loop and perform cleanup after the loop end. This reduces a lot of indentation and allows cleanup to more closely mirror setup actions before the loop starts.
  • Convert a DIAGNOSTIC to KASSERT().
  • Replace mycp with more typical 'p'.
Test Plan
  • Run aio regression tests.

Diff Detail

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

Event Timeline

jhb retitled this revision from to Cleanups to the AIO kproc main loop..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: kib.
kib edited edge metadata.
kib added inline comments.
sys/kern/vfs_aio.c
1177 ↗(On Diff #12441)

No need for ()

sys/vm/vm_map.c
457 ↗(On Diff #12441)

... switch to and from ...

490 ↗(On Diff #12441)

Assert that oldvm->vm_refcnt > 1 ?

This revision is now accepted and ready to land.Jan 19 2016, 3:08 AM
jhb edited edge metadata.
jhb marked 3 inline comments as done.
  • Feedback from kib.
This revision now requires review to proceed.Jan 19 2016, 9:34 PM
This revision was automatically updated to reflect the committed changes.