Page MenuHomeFreeBSD

pseudofs: add sysctl to set sbuf buffer size
ClosedPublic

Authored by dchagin on Jun 9 2019, 4:07 PM.

Details

Summary

MAXPHYS is to small for the modern program, it is not enough even
for print process memory map.
To avoid this, limit storage size of the sbuf buffer by tunable sysctl.

PR: 237883

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Why do you need a sysctl ? If bumping, simply increase to some larger but reasonable value, e.g. 2M. IOSIZE_MAX is definitely unreasonable.

Seems like the limit could be removed by using an sbuf drain function?

Seems like the limit could be removed by using an sbuf drain function?

Some pn_fill() may writes to the sbuf under non-sleepable lock, so better to use some constant which will be > MAXPHYS like kib@ suggested

This revision was not accepted when it landed; it landed in state Needs Review.Oct 16 2020, 9:58 AM
This revision was automatically updated to reflect the committed changes.