Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Apr 2025 01:30:34 -0400
From:      "Kevin P. Neal" <kpn@neutralgood.org>
To:        Jos Chrispijn <josc@cloudzeeland.nl>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Device "psm" is Giant locked
Message-ID:  <Z_3u-poXfG0zZLYD@neutralgood.org>
In-Reply-To: <e420b0a8-9c78-4a51-9c75-08d6a5c02365@cloudzeeland.nl>

index | next in thread | previous in thread | raw e-mail

On Fri, Apr 11, 2025 at 12:40:00PM +0200, Jos Chrispijn wrote:
>    [Proxmox 8.4 with FreeBSD 13.5]
>    After updating I ran into this:
>    "Device "psm" is Giant locked and may be..."
>    Is this a left over from back in the days when each *nix system had
>    just one CPU?
>    Is it solved in BSD 14?
>    Thanks, Jos

The "Giant" lock was the first step towards support for multiple CPUs,
yes. Finer grained locking was then added, and more and more parts of the
kernel were then over time removed from the giant lock because that finer
grained locking made it safe. Not all parts of the kernel were updated for
a variety of reasons.

I'm running 13.5 and I see this in my dmesg.boot file:
atkbd0: [GIANT-LOCKED]

So the entire kernel is locked when using the atkbd device. That's actually
fine since the drivers for the keyboard and the PS/2 mouse are infrequently
running even on systems that use those drivers. You simply can't type fast
enough to cause a performance issue with the PS/2 keyboard driver under
the giant lock. Same with the mouse. Anyway, does your computer even have
PS/2 ports on it? I'm under the impression those are rare these days. No
PS/2 ports means no issues with the giant lock.

I wouldn't worry about that message.

>From looking at my dmesg.boot file I also see this:
atkbdc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 15.

The psm man page says that the psm driver requires the atkbdc driver, which
I think means FreeBSD 15 won't support PS/2 keyboard and mouse ports. It
follows that messages about these particular giant lock messages will be
likewise gone.

You can ask on the freebsd-hackers list for an answer from someone who
actually does kernel development if you are still worried.

-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/
"Not even the dumbest terrorist would choose an encryption program that
 allowed the U.S. government to hold the key." -- (Fortune magazine
    is smarter than the US government, Oct 29 2001, page 196.)


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Z_3u-poXfG0zZLYD>