Page MenuHomeFreeBSD

tidy up swap_pager_putpages
ClosedPublic

Authored by dougm on Jul 28 2019, 4:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 27, 8:03 AM
Unknown Object (File)
Mon, Jun 23, 10:35 PM
Unknown Object (File)
Sat, Jun 21, 8:07 PM
Unknown Object (File)
Sat, Jun 21, 10:49 AM
Unknown Object (File)
Wed, Jun 18, 9:39 AM
Unknown Object (File)
Tue, Jun 17, 1:23 AM
Unknown Object (File)
Wed, Jun 11, 9:33 AM
Unknown Object (File)
Jun 2 2025, 6:15 AM
Subscribers

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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

swap_pager.c
1365–1366

Isn't this assignment unnecessary?

1381

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

1410–1411

Add spaces around the '+'.

swap_pager.c
1354–1355

I think that this one line no longer applies.

1365

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

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

swap_pager.c
1335

Please fix the "whos".

1354–1355

Please capitalize and punctuate these sentences.

1386

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

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