r343532 noted the difference between "hw.realmem" and "hw.physmem", which I
was previously unaware of. I discovered that neither sysctl had a description
visible via sysctl -d, so I found where they were defined and added
suitable descriptions. While in the file, I went ahead and added descriptions
for all the others which lacked them.
Details
- Reviewers
trond.endrestol_ximalas.info bcr kib - Group Reviewers
manpages - Commits
- rS345457: Add descriptions for sysctls in kern_mib.c and sysctl.3 which lack them.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 23264 Build 22299: arc lint + arc unit
Event Timeline
This is a step in the right direction. I appreciate the units are mentioned explicitly.
sys/kern/kern_mib.c | ||
---|---|---|
192 | modules, not drivers. That said, also the dcons buffer, if any, is not accounted for, on x86. | |
205–206 | Realmem is in fact silly and often not reliable. It is the amount of memory reported by bios. which is often does not have any resemblance to the reality. If system somehow detects this, it reports the max memory address as the hw.realmem. | |
222 | Again, this is not true. It is the difference between physmem (see above) and the size of wired memory. Many of kernel allocations do not wire underlying pages. Some user allocations are wired. |
I do not like it. The sysctl descriptions are supposed to be single-line and perhaps even shorter, now it looks like the paragraph from a man page.
So I propose to move the new text to the sysctl(3) manpage where it belongs. Instead, single-liners from sysctl(3) might be used for the sysctl description lines.
sys/kern/kern_mib.c | ||
---|---|---|
192 | dcons buffer is accounted on x86. |
sys/kern/kern_mib.c | ||
---|---|---|
191 | '; see sysctl(3)' is redundand, why kernel should lecture users how to use man(1) ? We do not do things like 'No such file or directory, see open(2)'. |