Page MenuHomeFreeBSD

pseudofs: add sysctl to set sbuf buffer size
ClosedPublic

Authored by dchagin on Jun 9 2019, 4:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 25, 7:23 PM
Unknown Object (File)
Sat, Jan 25, 7:23 PM
Unknown Object (File)
Wed, Jan 15, 7:48 PM
Unknown Object (File)
Wed, Jan 15, 9:29 AM
Unknown Object (File)
Wed, Jan 15, 9:29 AM
Unknown Object (File)
Wed, Jan 15, 9:29 AM
Unknown Object (File)
Wed, Jan 15, 9:29 AM
Unknown Object (File)
Wed, Jan 15, 8:38 AM
Subscribers

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
Lint Not Applicable
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.