Date: Wed, 3 Jan 2018 14:12:00 -0800 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: freebsd-current@freebsd.org Subject: Re: Programmatically cache line Message-ID: <35d2d373-92f1-499f-f470-e4528b08b937@freebsd.org> In-Reply-To: <CABh_MK=2uvPoNCg7qL14yVuxo_%2BHVSvccLTBAnRAHNzqor--0g@mail.gmail.com> References: <CALM2mEmWYz5nyqvxMJwMWoFOXnDTvWFrEug7UUha6xe7Um6ODw@mail.gmail.com> <20171230082812.GL1684@kib.kiev.ua> <CAJ-VmomxGJsn8eOtWoqevdW-spUPgcSGKEc7eR4xuXLP-E1XRA@mail.gmail.com> <08038E36-9679-4286-9083-FCEDD637ADCC@FreeBSD.org> <20180101103655.GF1684@kib.kiev.ua> <CABh_MK=2uvPoNCg7qL14yVuxo_%2BHVSvccLTBAnRAHNzqor--0g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01/03/18 13:37, Ed Schouten wrote: > 2018-01-01 11:36 GMT+01:00 Konstantin Belousov <kostikbel@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35d2d373-92f1-499f-f470-e4528b08b937>