Hacker News new | past | comments | ask | show | jobs | submit login
CoreFreq, a CPU monitoring software frequencies, ratios, C-states (github.com/cyring)
81 points by zdw on Dec 27, 2022 | hide | past | favorite | 26 comments



Why does it need a kernel module, rather than just using the MSR API like similar tools do? Intel's PCM tools for example, show quite similar information, and are available on a variety of OSes..


CoreFreq has a lot more info available to it: performance counters and events within the CPU, including instructions retired, cache accesses and misses, branch instructions, etc.


The Intel PCM suite does what you seem to be describing w/o a kernel module, and it uses nicely abstracted MSR accesses so that its portable to any OS.

https://github.com/intel/pcm


Which you can read quite nicely from userspace using perf_event_open.


But doesn't the kernel module approach yield better performance and therefore more accurate data?


Maybe, although you can use RDPMC to read quite a few performance counters from user mode after enabling them with perf_event_open.

But using perf_event_open interoperates with the rest of the system, whereas a random kernel module is likely to interfere with other perf users.


But without the module, it wouldn't be able to get real-time statistics for individual cores or logical processors, specific data from the kernel's performance counters, or some system-level statistics


What is the use case of this tool? Debugging embedded hardware issues or something? The requirement of an kernel module raises the bar quite a bit and I don't really understand the need.


I don't get it either. It doesn't give more information than `turbostat` or `powertop`. In fact it gives much less information. And installing the kernel module starts timers that immediately become the main reason the system is awake and drawing power, at least on my Intel "Raptor Lake" desktop.


The feature to show DIMM timings seem unique, I haven't seen that before. ECC DIMMs use the same ICs as regular memory but doesn't have the XMP/EXPO overclocking profiles, so I have to manually overclock them to get performance closer to regular RAM. Being able to have my benchmark/stability-test script write down the current timings in the log instead of having to write them down as I'm setting them in BIOS and later type them in would be an improvement.


The first thing that comes to mind when considering why this requires a form of a kernel module would be accessing functionality that normally results in protection faults, eg. trying to disable LAPIC interrupts from userspace with combination of iopl(3) and CLI instruction.


I just switched my desktop to linux (thanks Proton!) and this looks promising to replicate my Hydra setup.


Just FYI, “A software” is grammatically incorrect, as Software is a mass noun, not a collective noun. “Softwares” isn’t a word, for instance. (Similar to “money”, in that you wouldn’t say “I have a money, you have a money, and together we have two monies”, you just say “I have money, you have money, together we have more money”.)


People saying 'codes' and 'softwares' is one of my pet peeves.

I'm an American, btw. It's just 'code' and 'software' to me. Now I just use it as a hint that the person isn't American, much like when someone says 'maths'.


"A code" or "our codes" to describe software packages is extremely common in scientific computing, even in America.


Maths is correct in the UK.


Of course - which is what I implied with my last sentence (that it is correct in places outside of the US)



They're French.



Language is an emergent phenomena that dictionaries and grammars attempt, imperfectly, to describe.


But their secondary purpose is to add inertia to the language, helping large societies to function. That is, even though dictionaries are descriptive, you shouldn't deviate from what they describe for no good reason. Unless you're a poet, if the dictionary says you're using the word wrong, you're most likely using the word wrong.


Couldn't there be a collection of software? Hence softwares?


You can have a collection of programs. Or a collection of “pieces of software”. But not “a collection of softwares.” Software can be considered to be already plural in a sense, because it refers to the set of programs/procedures needed to perform a specific task.

https://www.dailywritingtips.com/is-software-a-mass-noun/

Similar with money, you can have multiple dollars, but you don’t have multiple monies.

“Hardware” also works this way, but it’s probably more obvious to people. If I have some hardware, and I buy more hardware, I wouldn’t say “I now have two hardwares.”


I'm sure somewhere in the world is an FX trader referring to "monies"..


A collection of software is software.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: