Page MenuHomeFreeBSD

Add linprocfs support for min_free_kbytes
ClosedPublic

Authored by chuck on May 24 2018, 8:55 PM.
Referenced Files
Unknown Object (File)
Jan 29 2024, 9:33 AM
Unknown Object (File)
Jan 29 2024, 9:33 AM
Unknown Object (File)
Jan 10 2024, 3:38 AM
Unknown Object (File)
Jan 1 2024, 9:36 PM
Unknown Object (File)
Dec 23 2023, 11:20 AM
Unknown Object (File)
Nov 14 2023, 9:53 PM
Unknown Object (File)
Nov 7 2023, 4:42 PM
Unknown Object (File)
Nov 6 2023, 4:31 PM
Subscribers
None

Details

Summary

This adds linprocfs support for proc/sys/vm/min_free_kbytes which the
free(1) program requires for correct operation.

Diff Detail

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

Event Timeline

style(9) fix in linprocfs_dominfree()

Thanks for this change - looks good to me, but one small question first. Also for future uploads can you include full context as on https://wiki.freebsd.org/Phabricator - e.g. one of:

git diff -U999999 other-branch > change.diff
git show -U999999 <commit-hash> > change.diff
svn diff --diff-cmd=diff -x -U999999 > change.diff
sys/compat/linprocfs/linprocfs.c
1286 ↗(On Diff #42957)

Will we want to extend this later, or make it RW? Or just returning min=0 is likely to be always sufficient?

sys/compat/linprocfs/linprocfs.c
1286 ↗(On Diff #42957)

This change mirrors the approach in illumos to return zero for reads. Effectively, it says, no memory is kept in reserve for "atomic allocations" (i.e. used at times when thread cannot be suspended). If this maps to something similar on FreeBSD, I'm happy to hook it up, but this should be fine for now and allows applications which check it to work.

LGTM.

It might be worth moving the clarification you provided in response to my query into a comment above linprocfs_dominfree.

This revision is now accepted and ready to land.Jun 12 2018, 4:18 PM

Update function comment to add details recommend by @emaste

This revision now requires review to proceed.Jun 13 2018, 12:59 AM
emaste added inline comments.
sys/compat/linprocfs/linprocfs.c
1636 ↗(On Diff #43682)

The dir assignment here is now redundant I believe.

This revision is now accepted and ready to land.Jun 13 2018, 1:23 AM
chuck added inline comments.
sys/compat/linprocfs/linprocfs.c
1636 ↗(On Diff #43682)

Agreed. Thanks!

This revision was automatically updated to reflect the committed changes.
chuck marked an inline comment as done.