Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD on Intel N100



On Wed, 5 Aug 2026, Jukka Marin wrote:

I have tried 10.1 and 11 on a mini-PC with Intel N100 CPU.  NetBSD runs
well and I was able to install pfSense in a virtual machine without
problems, but then I noticed that the system was running a bit slow.
I believe the reason is that the CPU clock is fixed at 800 MHz although
the CPU supports turbo modes up to 2-3 GHz.

Here's what sysctl says:

machdep.cpu.frequency.target = 801
machdep.cpu.frequency.current = 801
machdep.cpu.frequency.available = 801 800 700

So, no higher frequencies than 800 MHz are available.  I tried disabling
ACPI stuff in BIOS, but nothing changed.  Under l*, the CPU clock goes
up to around 3 GHz under load and to 600 or 700 MHz when the system is
idle.

Is there something I could do to make dynamic clock speed working?


It probably already is, but, on NetBSD, the actual current CPU frequency isn't
being shown. See:

sys/arch/x86/acpi/acpi_cpu_md.c:1068 -> cpufreq_get() ->
sys/kern/subr_cpufreq.c:272 -> cpufreq_get_raw() ->
sys/kern/subr_cpufreq.c:310 -> cf_get_freq() ->
sys/dev/acpi/acpi_cpu.c:309 -> acpicpu_pstate_get() ->
sys/dev/acpi/acpi_cpu_pstate.c:845 -> acpicpu_md_pstate_get() ->
sys/arch/x86/acpi/acpi_cpu_md.c:711-740

Code like FreeBSD's will need to be added for a new sysctl
(machdep.cpu.frequency.real)?:

https://github.com/freebsd/freebsd-src/blob/main/sys/x86/x86/cpu_machdep.c#L421

If you're OK with ballpark values, then you could do the same thing in userspace
as well.

I tested OpenBSD as well, but it had the same problem.


Did you also check (on OpenBSD):

sysctl hw.sensors | fgrep freq

-RVP


Home | Main Index | Thread Index | Old Index