Page MenuHomeFreeBSD

vm: Stop reducing vm_pageout_page_count
ClosedPublic

Authored by alc on Aug 1 2024, 7:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 9 2024, 10:23 AM
Unknown Object (File)
Oct 6 2024, 12:52 AM
Unknown Object (File)
Oct 3 2024, 5:46 PM
Unknown Object (File)
Oct 3 2024, 12:27 PM
Unknown Object (File)
Oct 3 2024, 11:23 AM
Unknown Object (File)
Oct 1 2024, 4:01 PM
Unknown Object (File)
Oct 1 2024, 2:55 PM
Unknown Object (File)
Sep 30 2024, 3:57 PM
Subscribers

Details

Summary

Reducing vm_pageout_page_count when the machine has less than 8MB of
physical memory is pointless, since we haven't run on such machines in
ages.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

alc requested review of this revision.Aug 1 2024, 7:31 PM
alc created this revision.

Should we also const-ify vm_pageout_page_count?

If making it const, what is the point of keeping it as a variable (4 bytes + accessing them in code) instead of pre-processor symbol? This would also remove some VLAs from the kernel.

In D46206#1053444, @alc wrote:

Should we also const-ify vm_pageout_page_count?

Yes please, it's used to size some stack-allocated arrays. It should probably be defined using the preprocessor, if only because that's what we'd typically do today when reimplementing that code.

Convert vm_pageout_page_count to a constant.

This revision is now accepted and ready to land.Aug 2 2024, 1:07 PM

BTW, I believe that the current size (32) was tailored for the old MAXPHYS 128k value.

Do we want to utilize the full maxphys-sized writes (now default to 1M, tunable), or at least tweak the pageout size according to maxphys? If yes, then in fact making vm_pageout_page_count constant is not right, but we also need to remove VLAs.

In D46206#1053585, @kib wrote:

BTW, I believe that the current size (32) was tailored for the old MAXPHYS 128k value.

Me too.

Do we want to utilize the full maxphys-sized writes (now default to 1M, tunable), or at least tweak the pageout size according to maxphys? If yes, then in fact making vm_pageout_page_count constant is not right, but we also need to remove VLAs.

Probably, but I'm not sure. It seems more likely to me that vm_object_page_collect_flush() would benefit, than vm_pageout_cluster(). Do we have any existing benchmarks?

For now, I propose to commit just the originally proposed change to vm_pageout_init(). Okay?

In D46206#1053659, @alc wrote:

For now, I propose to commit just the originally proposed change to vm_pageout_init(). Okay?

Sure.