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)
Sat, Nov 16, 3:38 PM
Unknown Object (File)
Nov 8 2024, 2:59 AM
Unknown Object (File)
Oct 24 2024, 4:22 AM
Unknown Object (File)
Oct 2 2024, 5:51 AM
Unknown Object (File)
Oct 2 2024, 5:38 AM
Unknown Object (File)
Sep 27 2024, 10:36 PM
Unknown Object (File)
Sep 27 2024, 1:21 AM
Unknown Object (File)
Sep 23 2024, 9:31 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.