Date: Wed, 08 Dec 2010 04:55:47 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: mdf@FreeBSD.org Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: coretemp(4)/amdtemp(4) and sysctl nodes Message-ID: <86r5dsq5oc.fsf@ds4.des.no> In-Reply-To: <AANLkTikNJ29AcE1fBXqq_atUU8PQBz9VUos0V%2BwBFQJs@mail.gmail.com> (mdf@freebsd.org's message of "Fri, 3 Dec 2010 10:05:02 -0800") References: <AANLkTikNJ29AcE1fBXqq_atUU8PQBz9VUos0V%2BwBFQJs@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
mdf@FreeBSD.org writes: > Each device provides a device_get_sysctl_ctx sysctl_ctx that is > automatically cleaned up when the device goes away. Yet the sysctl > nodes for both amdtemp and coretemp use the context of other devices, > rather than their own. I can't quite figure out why, though the two > are slightly different enough that they may have different reasons. I can't speak for amdtemp, but if coretemp used its own context instead of its parent's context, it would show up as dev.coretemp.X.temperature instead of dev.cpu.Y.temperature, where X is not necessarily equal to Y. Since, as you point out, the coretemp device is a child of the corresponding cpu device, there is no risk of orphaning the temperature OID. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86r5dsq5oc.fsf>