Page MenuHomeFreeBSD

Exclude Giant from adaptive locking.
Needs ReviewPublic

Authored by hselasky on Jul 5 2021, 1:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 2 2024, 6:57 AM
Unknown Object (File)
Jan 28 2024, 3:22 PM
Unknown Object (File)
Jan 28 2024, 11:58 AM
Unknown Object (File)
Dec 24 2023, 12:30 PM
Unknown Object (File)
Oct 21 2023, 9:51 AM
Unknown Object (File)
Aug 17 2023, 8:25 PM
Unknown Object (File)
Jun 16 2023, 3:40 AM
Unknown Object (File)
Jun 3 2023, 4:55 PM
Subscribers

Details

Reviewers
mjg
kib
markj
imp
Summary

Giant may be frequently locked over longer periods of time and is not fit
for adaptive mutex locking.

MFC after: 1 week
Sponsored by: NVIDIA Networking

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hselasky created this revision.

I would say that's very unclear.

Can you point at the problematic Giant consumer? More to the point, is there a serious problem moving them off to a dedicated lock?

@mjg:

It is a problem at least when loading and unloading PCI drivers, and during boot.

The problem is that syscons has a timer to disable the blank screen, which is Giant protected. This single Giant locked callout ends up blocking all callouts on the particular CPU it is invoked.

Also when Giant is locked for a longer timer all consumers like USB enumeration threads start spinning for nothing!

--HPS

I think this should better be postponed a bit until we fix all other Giant consumers except newbus, assuming it is what causes the longest delays.