Skip to content

topology-aware: add support for claiming device-hinted IRQs. - #767

Merged
askervin merged 5 commits into
containers:mainfrom
klihub:devel/topology-aware/claim-irqs-by-hints
Aug 28, 2026
Merged

topology-aware: add support for claiming device-hinted IRQs.#767
askervin merged 5 commits into
containers:mainfrom
klihub:devel/topology-aware/claim-irqs-by-hints

Conversation

@klihub

@klihub klihub commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Extend annotated irq-affinity to allow matching device IRQs to be claimed from topology-hinted devices. If a container is annotated so, resolve matching hinted device IRQs and claim them. Add new e2e test cases for interrupts claimed via device hints.

Note: This PR needs and is manually stacked on top of #761. Marked as a draft until that one gets merged.

@klihub
klihub requested a review from askervin August 25, 2026 10:44
@klihub
klihub force-pushed the devel/topology-aware/claim-irqs-by-hints branch from 48a04ad to 0e95ef5 Compare August 25, 2026 10:46
Comment thread cmd/plugins/topology-aware/policy/irq-affinity.go Outdated
Comment thread cmd/plugins/topology-aware/policy/pod-preferences.go Outdated
@klihub
klihub force-pushed the devel/topology-aware/claim-irqs-by-hints branch 3 times, most recently from 19b854c to b386087 Compare August 25, 2026 17:31
@klihub
klihub requested a review from askervin August 25, 2026 17:34
@klihub
klihub force-pushed the devel/topology-aware/claim-irqs-by-hints branch 3 times, most recently from fe4cc4a to cf905b6 Compare August 25, 2026 17:51
@klihub
klihub requested a review from kad August 25, 2026 17:56
@klihub klihub changed the title topology-aware: claim device-hinted IRQs if possible. topology-aware: add support for claiming device-hinted IRQs. Aug 25, 2026
@klihub
klihub force-pushed the devel/topology-aware/claim-irqs-by-hints branch from cf905b6 to 87a92ee Compare August 26, 2026 11:40
@klihub
klihub marked this pull request as ready for review August 26, 2026 11:40

@askervin askervin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks already good. One nit.

@askervin askervin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts still about the documentation line... Not sure if this improves, but somehow I'd wish that the reader gets that "devices" is only a scoped version of "claim".

Comment thread docs/resource-policy/policy/topology-aware.md Outdated
@klihub
klihub force-pushed the devel/topology-aware/claim-irqs-by-hints branch from 87a92ee to 1172283 Compare August 26, 2026 13:01
@klihub
klihub requested a review from askervin August 26, 2026 13:02

@askervin askervin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thanks for productizing IRQ support v2!

@klihub
klihub requested a review from fmuyassarov August 26, 2026 17:51
@kad
kad requested a balanced review from Copilot August 26, 2026 19:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds topology-hinted device IRQ claiming, building on IRQ metadata from #761.

Changes:

  • Adds IRQ lookup and allow-state APIs.
  • Resolves hinted device IRQs into container claims.
  • Adds documentation, unit tests, and end-to-end coverage.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
cmd/plugins/topology-aware/policy/irq-affinity.go Resolves hinted IRQ claims.
cmd/plugins/topology-aware/policy/pod-preferences.go Applies hinted IRQ preferences.
pkg/irq/irq.go Exposes numbered IRQ lookup and allow state.
pkg/irq/irq-cache.go Implements cached IRQ lookup.
pkg/irq/irq-cache_test.go Updates allow-state test usage.
pkg/irq/irq_test.go Tests IRQ lookup.
docs/resource-policy/policy/topology-aware.md Documents devices affinity.
test/e2e/policies.test-suite/topology-aware/n4c16/test25-irq/code.var.sh Tests allowed and denied hinted IRQs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/resource-policy/policy/topology-aware.md
Comment thread pkg/irq/irq_test.go Outdated
Comment thread pkg/irq/irq.go
Comment thread cmd/plugins/topology-aware/policy/irq-affinity.go
Comment thread docs/resource-policy/policy/topology-aware.md Outdated
Comment thread cmd/plugins/topology-aware/policy/irq-affinity.go
Comment thread cmd/plugins/topology-aware/policy/irq-affinity.go
Add irq.Interrupt(num int) for looking up interrupts by numbers.
Expose irq.Irq.IsAllowed() for external use.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
@klihub
klihub force-pushed the devel/topology-aware/claim-irqs-by-hints branch from 1172283 to bb3f087 Compare August 27, 2026 13:12
@klihub
klihub requested a review from kad August 27, 2026 13:22
klihub added 3 commits August 27, 2026 19:26
Extend annotated `irq-affinity` to allow matching device IRQs
to be claimed from topology-hinted devices. If a container is
annotated so try resolving the device IRQs and claiming them.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
@klihub
klihub force-pushed the devel/topology-aware/claim-irqs-by-hints branch from bb3f087 to 82e54e0 Compare August 27, 2026 16:27

@kad kad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@askervin
askervin merged commit 18c402f into containers:main Aug 28, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants