Page MenuHomeFreeBSD

centralize VM_BATCHQUEUE_SIZE definition & increase size on arm64
ClosedPublic

Authored by gallatin on Dec 15 2022, 2:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 30, 10:48 PM
Unknown Object (File)
Thu, Jun 27, 1:23 PM
Unknown Object (File)
Thu, Jun 27, 12:29 AM
Unknown Object (File)
Thu, Jun 27, 12:17 AM
Unknown Object (File)
Tue, Jun 25, 10:50 PM
Unknown Object (File)
Tue, Jun 25, 4:49 AM
Unknown Object (File)
Fri, Jun 21, 8:20 AM
Unknown Object (File)
Thu, Jun 20, 2:02 PM
Subscribers

Details

Summary

Remove the platform-specific definitions of VM_BATCHQUEUE_SIZE
for amd64 and powerpc64, and instead treat all 64-bit platforms
identically. This has the effect of increasing the arm64
VM_BATCHQUEUE_SIZE to match that of other platforms.

Note that I was about to create a review to increase the batchqueue size on arm64, and then I realized that it all the 64-bit platforms would be the same, so it would be easier to simply define everything in one place, rather than scattered in multple vmparam.h files.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb added inline comments.
sys/vm/vm_pagequeue.h
77–79

Do we need to keep the #ifndef now? It seems like we can probably remove it?

This revision is now accepted and ready to land.Dec 15 2022, 4:11 PM
sys/vm/vm_pagequeue.h
78

I think it would be preferable to invert this and test for ILP32 instead? As far as I know CHERI doesn't define LP64 but we'd want to treat it the same as arm64.

sys/vm/vm_pagequeue.h
78

In CheriBSD we tend to check __SIZEOF_LONG__ == 8 rather than __LP64__.

Updated patch to use SIZEOF_LONG, based on review feedback from @jhb and @markj

This revision now requires review to proceed.Jan 11 2023, 9:14 PM

Remove now unneeded ifndef VM_BATCHQUEUE_SIZE as suggested by @jhb

markj added inline comments.
sys/vm/vm_pagequeue.h
80

Just a comment: now that we drain per-CPU queues whenever we successfully obtain the queue lock, I think this comment about having "lots of memory" is a bit misleading. (And really it ought to say "lots of memory per CPU" if anything.) I think you could just delete the comment.

This revision is now accepted and ready to land.Jan 13 2023, 3:53 PM