Re: Giant Locked drivers

From: Elliott Mitchell <ehem+freebsd_at_m5p.com>
Date: Fri, 02 Dec 2022 00:33:00 UTC
On Tue, Nov 15, 2022 at 10:37:36AM -0700, Warner Losh wrote:
> When set to 0, you get today's behavior. If set to 1, it will no longer
> allow drivers that don't request MPSAFE interrupt handlers from registering
> (the interrupt setup will return an error).
> 
> This will allow us to understand what is lost if we throw the switch, and
> allow users to proactively test their systems to see if they are
> affected or not (and if they are, if they want to live without the
> functionality, or want to fund work in the area).
> 
> Comments?

Partially building on Ed Maste's idea; perhaps the value 1 should be
allow giant-locked drivers and -1 should disallow giant-locked drivers.
Then use 0 for interesting behavior.  Perhaps a value of 0 should be
switched to 1 90% of the time and -1 1% of the time.  Theory being to be
annoying enough to attact attention, but not annoying enough to be turned
off.

I'm at least partially joking, but it might be a way to cause progress
(or might cause trouble).


In other news in two handy VMs.  On x86: (a full VM with hardware emulation)

atkbd0: [GIANT-LOCKED]
psm0: [GIANT-LOCKED]
WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 14.0.

On ARM64: (basically pure VM with no emulated hardware)

<nothing>

So right now everyone is reporting x86 console devices and nothing else.
This suggests the x86 console is urgent for giant removal.  Then perhaps
it will be viable to default to disabled (or perhaps something else will
float to the top).


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg@m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445