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)
Nov 24 2024, 1:16 AM
Unknown Object (File)
Nov 8 2024, 6:44 PM
Unknown Object (File)
Oct 27 2024, 11:05 PM
Unknown Object (File)
Sep 21 2024, 6:22 AM
Unknown Object (File)
Sep 21 2024, 5:50 AM
Unknown Object (File)
Sep 17 2024, 8:36 PM
Unknown Object (File)
Sep 17 2024, 8:29 PM
Unknown Object (File)
Sep 17 2024, 8:26 PM
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.