Re: Programmatically cache line

From: Nathan Whitehorn <nwhitehorn_at_freebsd.org>
Date: Wed, 3 Jan 2018 14:12:00 -0800
On 01/03/18 13:37, Ed Schouten wrote:
> 2018-01-01 11:36 GMT+01:00 Konstantin Belousov <kostikbel_at_gmail.com>:
>>>>> On x86, the CPUID instruction leaf 0x1 returns the information in
>>>>> %ebx register.
>>>> Hm, weird. Why don't we extend sysctl to include this info?
>> For the same reason we do not provide a sysctl to add two integers.
> I strongly agree with Kostik on this one. Why add stuff to the kernel,
> if userspace is already capable of extracting this? Adding that stuff
> to sysctl has the downside that it will effectively introduce yet
> another FreeBSDism, whereas something generic already exists.
>

Well, kind of. The userspace version is platform-dependent and not 
always available: for example, on PPC, you can't do this from userland 
and we provide a sysctl machdep.cacheline_size to userland. It would be 
nice to have an MI API.
-Nathan
Received on Wed Jan 03 2018 - 21:23:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:14 UTC