Page MenuHomeFreeBSD

Make chain frames memory allocation in mps(4)/mpr(4) physically non-contiguous
ClosedPublic

Authored by mav on Feb 17 2018, 10:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 29, 8:28 PM
Unknown Object (File)
Nov 20 2025, 11:29 PM
Unknown Object (File)
Nov 15 2025, 11:44 AM
Unknown Object (File)
Nov 10 2025, 6:23 AM
Unknown Object (File)
Nov 9 2025, 11:10 PM
Unknown Object (File)
Nov 9 2025, 9:23 PM
Unknown Object (File)
Nov 9 2025, 4:50 PM
Unknown Object (File)
Oct 30 2025, 1:31 AM
Subscribers

Details

Summary

Chain frames required to satisfy all 2K declared I/Os of 128KB each take more then a megabyte of a physical memory, all of which existing code tries allocate as physically contiguous. This patch removes that physical contiguousness requirement, leaving only virtual contiguousness. I was thinking about other ways of allocation, but the less granular allocation becomes, the bigger is the overhead and/or complexity, reaching about 100% overhead if allocate each frame separately.

The patch also bumps the chain frames hard limit from 2K to 16K. It is more then enough for the case of default REQ_FRAMES and MAXPHYS (drivers will allocate less than that automatically), while in case of increased MAXPHYS it will control maximal memory usage.

Diff Detail

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

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Feb 27 2018, 1:48 AM
This revision was automatically updated to reflect the committed changes.