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)
Tue, Apr 21, 6:13 AM
Unknown Object (File)
Sun, Apr 19, 10:46 PM
Unknown Object (File)
Sun, Apr 19, 7:58 PM
Unknown Object (File)
Sat, Apr 18, 8:28 AM
Unknown Object (File)
Tue, Apr 7, 2:49 AM
Unknown Object (File)
Mon, Apr 6, 2:29 PM
Unknown Object (File)
Sun, Apr 5, 10:02 AM
Unknown Object (File)
Fri, Apr 3, 9:56 PM
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.