This adds linprocfs support for proc/sys/vm/min_free_kbytes which the
free(1) program requires for correct operation.
Details
- Reviewers
imp ken emaste - Commits
- rS335205: Add linprocfs support for min_free_kbytes
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
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.
sys/compat/linprocfs/linprocfs.c | ||
---|---|---|
1636 ↗ | (On Diff #43682) | The dir assignment here is now redundant I believe. |
sys/compat/linprocfs/linprocfs.c | ||
---|---|---|
1636 ↗ | (On Diff #43682) | Agreed. Thanks! |