Page MenuHomeFreeBSD

Clean up the comments and code style in and around vm_pageout_cluster().
ClosedPublic

Authored by alc on Aug 3 2016, 7:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 23 2024, 9:51 AM
Unknown Object (File)
Sep 19 2024, 9:57 PM
Unknown Object (File)
Sep 18 2024, 12:15 PM
Unknown Object (File)
Sep 18 2024, 12:15 PM
Unknown Object (File)
Sep 18 2024, 12:15 PM
Unknown Object (File)
Sep 18 2024, 12:15 PM
Unknown Object (File)
Sep 18 2024, 12:02 PM
Unknown Object (File)
Sep 8 2024, 6:24 AM
Subscribers
None

Details

Summary

vm_pageout_cluster() has several incorrect comments. This revision fixes those comments. In addition, vm_pageout_cluster() has some comments that are "out of context". In other words, while they might be true, they are out of place. This revision eliminates those comments. Finally, this revision fixes some style issues within vm_pageout_cluster().

Diff Detail

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

Event Timeline

alc retitled this revision from to Clean up the comments and code style in and around vm_pageout_cluster()..
alc updated this object.
alc edited the test plan for this revision. (Show Details)
alc added reviewers: kib, markj.
markj edited edge metadata.
markj added inline comments.
vm/vm_pageout.c
390 ↗(On Diff #19018)

In PQ_LAUNDRY, we only consider pages in the laundry queue. Should we also attempt to cluster pages from the inactive queue?

This revision is now accepted and ready to land.Aug 3 2016, 7:49 PM
vm/vm_pageout.c
455 ↗(On Diff #19018)

The word "page" in the previous line didn't make sense to me, but I was sure what it should really be. Should it be "alignment"?

vm/vm_pageout.c
390 ↗(On Diff #19018)

I'm not sure. It might well depend on whether we are in "shortfall" or "background" laundering mode. In background mode, I would say, "Consider PQ_LAUNDRY only." The reason being that I want to give dirty pages longer to be re-referenced before we attempt to launder and reclaim them. Allowing a page "I" from PQ_INACTIVE to cluster with the page "L" from the head of PQ_LAUNDRY is accelerating the potential reclamation of "I". In other words, we're not giving "I" as much time to be re-referenced as we gave "L". Ultimately, not clustering with PQ_INACTIVE pages may lead to more disk writes, if we later launder "I" after it has migrated to the head of PQ_LAUNDRY, but my assumption is that in background mode we're not I/O bottlenecked. In contrast, in shortfall mode, we might care more about optimizing the number of disk writes, so allowing pages to be either PQ_LAUNDRY or PQ_INACTIVE could be better.

Does this make sense?

vm/vm_pageout.c
390 ↗(On Diff #19018)

Yes, thanks. Indeed, I'd be reticent about making the change I suggested above since it can cause pages to "bypass" LRU. This is something of a behaviour change with respect to HEAD though, since we can cluster any page in the inactive queue, even those with PG_WINATCFLS not set. In the shortfall case, recall that r292392 causes the pagedaemon to deactivate dirty pages more aggressively than clean pages, which improves the ability of the laundry thread to cluster pages from the PQ_LAUNDRY queue. So I'm inclined to think that no change is needed.

455 ↗(On Diff #19018)

"Alignment" seems like a likely candidate to me based on nearby comments.

alc edited edge metadata.

Substitute the word "alignment" for "page" in one of the comments.

This revision now requires review to proceed.Aug 4 2016, 2:57 AM
vm/vm_pageout.c
389 ↗(On Diff #19025)

Remove weird typography as well, the '->>' glyph only distract the reader. 'ONLY' does not deserve loud tone.

395 ↗(On Diff #19025)

sporaDic ?

kib edited edge metadata.
This revision is now accepted and ready to land.Aug 4 2016, 8:26 AM
alc marked 2 inline comments as done.Aug 4 2016, 3:42 PM
alc added inline comments.
vm/vm_pageout.c
389 ↗(On Diff #19025)

Done.

395 ↗(On Diff #19025)

Good catch. I overlooked this one.

This revision was automatically updated to reflect the committed changes.
alc marked 2 inline comments as done.