Re: Killing Giant for 13

From: Hans Petter Selasky <>
Date: Tue, 13 Jul 2021 15:13:08 UTC

I've been pondering with some ideas around Giant removal too.

First of all, I think the first step getting rid of Giant, is to move 
all Giant usage related to newbus into two own global functions, so we 
can start working on what and how the device tree should be protected 
separately. Personally I would prefer a sleepable EPOCH (See, because that would interact nicely 
with freeing the device softc and other internal structures.



Secondly I think that if we can remove all code sleeping with Giant, so 
to speak, either by using msleep(&Giant) or by using M_NOWAIT, we can 
get rid of the DROP and PICKUP Giant macros, and get Giant out of the 
fast path in all of the kernel. Then if Giant i still around as a mutex, 
it won't have that much impact!

Warner, what is the status of your Giant work?