Page MenuHomeFreeBSD

gicv3_its: Leave LPI interrupts enable during handling
ClosedPublic

Authored by scottph on Feb 16 2021, 6:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 29 2024, 5:12 AM
Unknown Object (File)
Jan 13 2024, 11:43 AM
Unknown Object (File)
Dec 20 2023, 7:51 AM
Unknown Object (File)
Dec 12 2023, 3:11 AM
Unknown Object (File)
Oct 29 2023, 5:35 PM
Unknown Object (File)
Sep 5 2023, 10:58 PM
Unknown Object (File)
Sep 5 2023, 10:51 PM
Unknown Object (File)
Sep 1 2023, 12:14 AM

Details

Summary

This follows the behavior on x86 where edge triggered interrupts
are not disabled when executing the handler. Because the ITS is a
shared resource, contention for the command queue lock can be
substantial.

Suggested by: gallatin
Sponsored by: Ampere Computing LLC

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Are legacy interrupts supported on this platform? Is this code also used for legacy interrupts?

I was about to start on a patch which included a bool to tell if the interrupt was for msi/msi-x and only skip the enable/disable for msi/msi-x.

This driver only manages MSI/MSI-X interrupts.

This revision is now accepted and ready to land.Feb 16 2021, 6:21 PM

Are legacy interrupts supported on this platform?

PCIe legacy interrupts do technically work on arm64, but at least in my experience, only with awful performance.
I've hit that twice: on Scaleway's ThunderX VPS service (R.I.P.) for some reason MSI was blacklisted so virtio was awfully slow because of legacy, and (tested on the MACCHIATObin but applicable probably everywhere) AMD Radeon GPUs were wasting CPU on hundreds of thousands of interrupts per second when legacy was used (fixed by enabling MSI in drm with D21008 / https://github.com/FreeBSDDesktop/kms-drm/pull/163).

I think this is fine. If you ever have real level-triggered interrupts in the future you'll have to fix this to mask them for those.

I've tested this on a Netflix server, and can confirm that it works fine, and eliminates spinlock contention on the gic cmd queue.