[Bug 243711] dtrace immediately panics the system if compiled without SMP

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jan 30 16:20:00 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243711

--- Comment #3 from Mark Johnston <markj at FreeBSD.org> ---
(In reply to alex_y_xu from comment #2)
Ah, I think the snapshots have invariants-checking disabled, which would
explain why you're not seeing the problem during boot.

> I want to use a non-SMP kernel because I am on a single-CPU VM and I assume that no-SMP kernels are more efficient.

Fair enough.  Indeed, mtx_lock_spin() does nothing but disable interrupts in
non-SMP FreeBSD kernels (and nothing if they are already disabled).  Non-SMP
kernels definitely aren't as well tested though.  It looks like DTrace has been
broken there basically forever: MAXCPU is 256 in kernel modules even when
compiled without SMP:

#if defined(SMP) || defined(KLD_MODULE)                                         
#ifndef MAXCPU                                                                  
#define MAXCPU          256                                                     
#endif                                                                          
#else                                                                           
#define MAXCPU          1                                                       
#endif 

... and smp_rendezvous() and other kernel APIs use pass-by-value for cpuset_t's
for a reason that is not clear to me.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list