Re: Warning: FreeBSD using its (in partition) SWAP space when running under Parallels on aarch64 macOS (M4 MAX)
Mark Millard <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
On Feb 19, 2025, at 05:38, Olivier Certner <[email protected]> wrote: > Hi Mark, > >> Something I possibly should have done --but did not do was to set: >> kern.hz=100 >> in /boot/loader.conf (or anywhere). > > Barring explicitly setting this tunable, the kernel automatically defaults to a kern.hz of 100 (HZ_VM) when it detects it runs in a virtual machine. That detection is currently performed by the smbios(4) driver, which is supposed to handle Parallels and is compiled in by arm64's GENERIC, so I assume you have actually been running with kern.hz set to 100 already. It only handles the amd64(/i386) Parallels smbios case. ARM Parallels is different. sys/dev/smbios/smbios_subr.c has: static const struct { const char *vm_pname; int vm_guest; } vm_pnames[] = { { "VMware Virtual Platform", VM_GUEST_VMWARE }, { "Virtual Machine", VM_GUEST_VM }, /* Microsoft VirtualPC */ { "QEMU Virtual Machine", VM_GUEST_VM }, { "VirtualBox", VM_GUEST_VBOX }, { "Parallels Virtual Platform", VM_GUEST_PARALLELS }, { "KVM", VM_GUEST_KVM }, }; but on an M4 MAX macOS system with FreeBSD under Parallels, FreeBSD reports: # kenv smbios.system.product Parallels ARM Virtual Machine Thus under aarch64 Parallels FreeBSD reports: # sysctl kern.vm_guest kern.vm_guest: none # sysctl kern.hz kern.hz: 1000 (The above is copied from another Email that I sent out later yesterday.) > The result of: > sysctl kern.hz kern.vm_guest > inside your VM should say where we actually stand. > aarch64 FreeBSD has no clue that it is running in a VM. === Mark Millard marklmi at yahoo.com