Page MenuHomeFreeBSD

tidy up swap_pager_putpages
ClosedPublic

Authored by dougm on Jul 28 2019, 4:38 AM.

Details

Summary

(1) convert the panic() at the function's start into a KASSERT(), (2) convert sync into a bool-type variable async, (3) make the variable definitions style(9) compliant, and (4) move the calls to swp_pager_init_freerange() and swp_pager_freeswapspace() out from under the object lock.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dougm created this revision.Jul 28 2019, 4:38 AM
alc added inline comments.Jul 28 2019, 3:59 PM
swap_pager.c
1365 ↗(On Diff #60208)

Isn't this assignment unnecessary?

1384 ↗(On Diff #60208)

I think it's within the scope of this patch to fix the style issue here: Add spaces around the '+'.

1414 ↗(On Diff #60208)

Add spaces around the '+'.

alc added inline comments.Jul 28 2019, 4:04 PM
swap_pager.c
1355 ↗(On Diff #60208)

I think that this one line no longer applies.

1364 ↗(On Diff #60208)

I would delete this blank line because the above block comment describes the below initialization to 'async'.

dougm updated this revision to Diff 60211.Jul 28 2019, 4:19 PM

Apply reviewer suggestions. Make another style(9) fix.

alc added inline comments.Jul 28 2019, 4:47 PM
swap_pager.c
1335 ↗(On Diff #60211)

Please fix the "whos".

1355–1356 ↗(On Diff #60211)

Please capitalize and punctuate these sentences.

1387 ↗(On Diff #60211)

Shouldn't this be a period instead of a comma?

dougm updated this revision to Diff 60213.Jul 28 2019, 5:00 PM

Tidy up comments.

alc accepted this revision.Jul 28 2019, 5:07 PM
alc added reviewers: kib, markj.

I think that this is a good change and ready to commit. Give Kostik and Mark a chance to comment.

This revision is now accepted and ready to land.Jul 28 2019, 5:07 PM
markj accepted this revision.Jul 28 2019, 6:34 PM
kib accepted this revision.Jul 28 2019, 7:05 PM
This revision was automatically updated to reflect the committed changes.