Giant is a lock which may be locked for a longer period of time.
Unfortunately some important subsystems like the console,
still use it, invoking regular timers.
Giant is also used to protect device attach and detach. Sometimes when
doing attach and detach, the Giant lock may be locked for a longer period
of time, due to tight polling loops on the hardware and other heavy
initialization.
When Giant is locked, innocent callbacks using the Giant lock, blocks
the whole queue of completed callbacks for an unacceptable amount of
time. To solve this, two measures are taken:
- Avoid blocking other callouts which do not use Giant, move all Giant
locked callbacks to a separate completion queue.
- Trylock Giant, to avoid dragging the callout subsystem down into the
congestion, when Giant is locked.
MFC after: 1 week
Sponsored by: NVIDIA Networking