Page MenuHomeFreeBSD

Update comments and code since aio daemons are kprocs, not kthreads.
ClosedPublic

Authored by jhb on Jan 19 2016, 11:58 PM.
Tags
None
Referenced Files
F93753268: D4999.id12531.diff
Thu, Sep 12, 5:31 AM
Unknown Object (File)
Sun, Sep 8, 1:38 PM
Unknown Object (File)
Sun, Sep 8, 9:07 AM
Unknown Object (File)
Sat, Sep 7, 2:35 PM
Unknown Object (File)
Sat, Aug 24, 2:54 AM
Unknown Object (File)
Aug 11 2024, 9:12 PM
Unknown Object (File)
Jul 29 2024, 11:48 PM
Unknown Object (File)
Jun 9 2024, 7:06 AM
Subscribers

Details

Summary

AIO daemons have always been kernel processes to facilitate switching to
user VM spaces while servicing jobs. Update various comments and data
structures that refer to AIO daemons as threads to refer to processes
instead.

Ironically, aiothreadlist used to be aioproclist before it was misnamed
to aiothreadlist when threads were added to the kernel. I don't like
the 'foolist' name that the AIO code uses for objects that are list
members ('foolist' should be a list head, not a list member IMO), so I'm
using this opportunity to drop the 'list' suffix as well. I might do a
pass to rename aiocblist to something less rediculous as well, perhaps
before the rework since it is smaller and more contained right now.

Test Plan
  • Run the aio 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 Update comments and code since aio daemons are kprocs, not kthreads..
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
133 ↗(On Diff #12485)

Change indent to 4 spaces, as it is done in other places even in vfs_aio.c ?

498 ↗(On Diff #12485)

Side question, why these zones are NOFREE ?

1800 ↗(On Diff #12485)

Remove extra () while you are there ?

1820 ↗(On Diff #12485)

And there too.

This revision is now accepted and ready to land.Jan 20 2016, 7:41 AM

Mmm, I might do a separate whitespace / style sweep removing extra parens. I think this is the last "cleanup" patch in my changes so far, so this would be a good time as any to do it.

sys/kern/vfs_aio.c
133 ↗(On Diff #12485)

Hmm, I'd have to change the line above which would then be mixing in a pure whitespace
change. I could do a followup change to fix the whitespace though.

498 ↗(On Diff #12485)

It looks like Jeff set NOFREE when converting this over from the old zone allocator. The old zone allocator never reclaimed memory, so Jeff may have done that as a general rule when converting away from zinit().

I'm pretty sure that most of these zones do not need to be NOFREE. The only one I'm possibly unsure of is the kaio_zone.

This revision was automatically updated to reflect the committed changes.