Microfreezes - FreeBSD 15.1 (bfr.13)

I put the main kernel 14.0, but the graphics mode did not boot (amdgpu) - it did not work to install drivers and stuff for X.
I didn't notice any microfreezes in the console.
 
Guys, just curious, what was the last recommended settings (e.g. kern.sched.steal_thresh=0) you used to mitigate scheduling stutters? Thank you!
 
IMHO Microfreezes return for FreeBSD 15.1 (mb and for before ...)
FreeBSD now have new model SMP - ULE
# sysctl kern.sched.ule.steal_thresh; sysctl kern.sched.ule.preempt_thresh; sysctl machdep.idle

New variable names and default values:
kern.sched.ule.steal_thresh: 2
kern.sched.ule.preempt_thresh: 80
machdep.idle: acpi

I set any values:
kern.sched.ule.steal_thresh: 2 <-> 1 <-> 0
kern.sched.ule.preempt_thresh: 80 <-> 40 <-> 224 - 224 I find on Internet space... but not remember place
machdep.idle: mwait <-> acpi

Try entering a long line of characters in any text editor and simply moving the cursor back and forth — you will eventually observe a freeze. As another variant: just grab a window with the mouse and move it around.

=== System ===
FreeBSD wfwc-001 15.1-RELEASE-p5 FreeBSD 15.1-RELEASE-p5 releng/15.1-n283639-893c7c99b60d GENERIC amd64
hw.model: AMD Ryzen 5 3600 6-Core Processor

=== kern.sched.ule ===
kern.sched.ule.always_steal: 0
kern.sched.ule.trysteal_limit: 2
kern.sched.ule.steal_thresh: 2
kern.sched.ule.steal_idle: 1
kern.sched.ule.balance_interval: 127
kern.sched.ule.balance: 1
kern.sched.ule.affinity: 1
kern.sched.ule.idlespinthresh: 157
kern.sched.ule.idlespins: 10000
kern.sched.ule.static_boost: 115
kern.sched.ule.preempt_thresh: 224
kern.sched.ule.interact: 30
kern.sched.ule.slice: 12
kern.sched.ule.quantum: 94488

=== machdep.idle ===
machdep.idle: mwait

=== idle test instructions ===
Before: mwait
Run: sysctl machdep.idle=spin
Then reproduce: drag a window with the mouse / move cursor in editor
Record: did freezes disappear, become rarer, or stay the same?
Restore: sysctl machdep.idle=mwait
sysctl hw.model
hw.model: AMD Ryzen 5 3600 6-Core Processor

pciconf -lv | grep -B3 display

vgapci0@pci0:13:0:0: class=0x030000 rev=0xc1 hdr=0x00 vendor=0x1002 device=0x73ef subvendor=0x1da2 subdevice=0x452e
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Navi 23 [Radeon RX 6650 XT / 6700S / 6800S]'
class = display
=== DRM package ===
drm-612-kmod-6.12.110.1501000_3 Direct Rendering Manager (DRM) GPU drivers
drm-kmod-20260508 Direct Rendering Manager (DRM) GPU drivers metaport
gpu-firmware-kmod-20260519,1 Firmware modules for the drm-kmod drivers

=== Mesa packages ===
mesa-dri-26.2.2_1 OpenGL hardware acceleration drivers for DRI2+
mesa-libs-26.2.2_1 OpenGL libraries that support GLX and EGL clients

=== Loaded GPU kernel modules ===
32 1 0xffffffff83c00000 8c1e28 amdgpu.ko
39 1 0xffffffff83ae2000 356d0 amdgpu_dimgrey_cavefish_sos_bin.ko
40 1 0xffffffff83b18000 415e0 amdgpu_dimgrey_cavefish_ta_bin.ko
41 1 0xffffffff83b5a000 3dd88 amdgpu_dimgrey_cavefish_smc_bin.ko
42 1 0xffffffff83b98000 1de58 amdgpu_dimgrey_cavefish_dmcub_bin.ko
43 1 0xffffffff83bb6000 425e0 amdgpu_dimgrey_cavefish_pfp_bin.ko
44 1 0xffffffff844c2000 425e0 amdgpu_dimgrey_cavefish_me_bin.ko
45 1 0xffffffff84505000 42560 amdgpu_dimgrey_cavefish_ce_bin.ko
46 1 0xffffffff84548000 238f0 amdgpu_dimgrey_cavefish_rlc_bin.ko
47 1 0xffffffff8456c000 43860 amdgpu_dimgrey_cavefish_mec_bin.ko
48 1 0xffffffff845b0000 43860 amdgpu_dimgrey_cavefish_mec2_bin.ko
49 1 0xffffffff845f4000 a5e0 amdgpu_dimgrey_cavefish_sdma_bin.ko
50 1 0xffffffff845ff000 8fb70 amdgpu_dimgrey_cavefish_vcn_bin.ko

=== Mesa / OpenGL runtime info ===
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 6650 XT (radeonsi, navi23, ACO, DRM 3.61, 15.1-RELEASE-p5)
OpenGL version string: 4.6 (Compatibility Profile) Mesa 26.2.2

Now I set:
# sysctl kern.sched.ule.steal_thresh; sysctl kern.sched.ule.preempt_thresh; sysctl machdep.idle
kern.sched.ule.steal_thresh: 2
kern.sched.ule.preempt_thresh: 224 ?????
machdep.idle: mwait
 
Last edited:
Yes, bugzilla. And also consider perhaps updating the title of the post and remove "13" , so this thread gets re-surfaced. I tried out the "moving window around repeteadly" and have not been able to reproduce the stall on a i915 gpu. This was on x11 , no picom. Is this something specific to the amd drm pipeline perhaps? Can others with diffrent GPUs reproduce this?
 
Yes, bugzilla. And also consider perhaps updating the title of the post and remove "13" , so this thread gets re-surfaced. I tried out the "moving window around repeteadly" and have not been able to reproduce the stall on a i915 gpu. This was on x11 , no picom. Is this something specific to the amd drm pipeline perhaps? Can others with diffrent GPUs reproduce this?
I don't known ... Mb drm. Any forums say what drm drivers but before very simple freezes depend on AMD CPU. I don't find now needed info...
 
Question:
It sounds like OP WCSN has modified scheduling parameters. Is that correct? If so, have you tried the behavior with the defaults?
Asking because I think there have been changes that made defaults "better"
 
I'd try 4BSD with a 3600 and disable SMT in BIOS, but I think GPU crash/errors might be unrelated (I'd try oldest drm-kmod available; either 515 or 61)

loader.conf:
Code:
kern.hz="137438"
kern.eventtimer.periodic="1"
kern.eventtimer.idletick="1"
kern.sched.name="4BSD"

sysctl.conf (I'd disable mitigations for testing and maybe back on/1 later, Ryzen might have more mitigations; afaik hlt/halt's better-perf than mwait)
Code:
machdep.mitigations.zenbleed.enable="0"
machdep.mitigations.rngds.enable="0"
machdep.mitigations.flush_rsb_ctxsw="0"
machdep.idle="hlt"
machdep.idle_mwait="0"
kern.sched.4bsd.ipiwakeup.enabled="0"
kern.sched.4bsd.ipiwakeup.useloop="1"
kern.sched.4bsd.ipiwakeup.usemask="0"

Not sure if this thread was referencing FreeBSD 14 before, but it feels like something changed with desktop interactions and random stutter with 15 (Warcraft 3's audio was stuttery-mess without most of those settings 15.1/16.0 on no-HT Skylake; I read ULE's more-tuned for SMT/logical multicore on modern CPUs, but logical's never been consistent on desktop hence 4BSD + SMT off :p)
 
Back
Top