Weed-whacking sysctl(8)

Alfred Perlstein alfred at freebsd.org
Wed Jan 19 21:13:45 UTC 2011


* mdf at FreeBSD.org <mdf at FreeBSD.org> [110119 12:28] wrote:
> As bde@ mentioned, there's very little actual use of the sysctl format
> strings.  I recently changed it so the use is even smaller, but I've
> got a quandary as to how to finish the job.
> 
> I agree with Bruce that the formatted structs can just be removed.
> This leaves just the "IK" format, which shows up in just a few files:
> 
> sys/dev/acpica/acpi_thermal.c:
> sys/dev/amdtemp/amdtemp.c
> sys/dev/acpi_support/atk0110.c
> sys/dev/coretemp/coretemp.c
> sys/dev/iicbus/max6690.c
> sys/dev/iicbus/ds1775.c
> 
> I see two solutions to "IK".  The first is to preserve the interface
> as experienced by sysctl(8) users, and add some functions to push a
> string buffer back to userspace, and parse a string in the kernel.
> The second is to preserve the binary interface as experienced by
> sysctl(3) users, and either have the values be dumped in the slightly
> obscure 10ths of Kelvin values, or add a new CTLTYPE_KELVIN so
> sysctl(8) can also keep showing things as it does today.
> 
> Given how infrequent the use is CTLTYPE_KELVIN seems a non-starter.
> So who is the worse client to break: those who use sysctl(8) to look
> at temperatures, or those who have a utility to manipulate these
> values using sysctl(3)?

I'd say that it's not great to break either system.

The reason is that either the syscall or cmd line utility can be
the basis of numerous system monitoring tools.

By breaking either interface we discourage people from using it.

I apologize for coming in so late, but why is CTLTYPE_KELVIN such
an awful thing?

Also, not to digress, but it sounds like there's a rototilling of
the KPI going on here as well that might break 3rd parties who do
their own monitoring software.

Overall it's not a big thing, but when you consider all the changes
like this that go on, it can add up to a discouraging target to
track.

Honestly I don't have a strong opinion on this and feel free to use
your best judgement and as well as what other people bring to the
table, I just wanted to bring the software churn issue up and
leave the question, "is there a way to do this with minimal 3rd party
breakage".

thank you,
-- 
- Alfred Perlstein
.- VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10
.- FreeBSD committer


More information about the freebsd-arch mailing list