vm-device: support batch update interrupt source group GSI

Split interrupt source group restore into two steps, first restore
the irqfd for each interrupt source entry, and second restore the
GSI routing of the entire interrupt source group.

This patch will reduce restore latency of interrupt source group,
and in a 200-concurrent restore test, the patch reduced the
average IOAPIC restore time from 15ms to 1ms.

Signed-off-by: Yong He <alexyonghe@tencent.com>
This commit is contained in:
Yong He
2023-08-01 14:41:23 +08:00
committed by Rob Bradford
parent ecf3db5092
commit 0149e65081
11 changed files with 66 additions and 4 deletions

View File

@@ -59,9 +59,13 @@ impl InterruptSourceGroup for TestInterrupt {
_index: InterruptIndex,
_config: InterruptSourceConfig,
_masked: bool,
_set_gsi: bool,
) -> Result<(), std::io::Error> {
Ok(())
}
fn set_gsi(&self) -> Result<(), std::io::Error> {
Ok(())
}
fn notifier(&self, _index: InterruptIndex) -> Option<EventFd> {
Some(self.event_fd.try_clone().unwrap())
}