Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pci: report NUMA node locality for the PCI devices #225

Merged
merged 1 commit into from
Feb 24, 2021

Conversation

ffromani
Copy link
Collaborator

@ffromani ffromani commented Feb 8, 2021

We want to expose the NUMA locality of the PCI devices,
much like we already do for GPU devices.
This is very important for high-end, high-performance devices
(NICs, storage controllers).

To enable testing, we update the snapshot with another one
captured with more PCI device informations.
See: #224

Signed-off-by: Francesco Romani [email protected]

@ffromani
Copy link
Collaborator Author

ffromani commented Feb 8, 2021

(Implicitely) depends on #224

@ffromani ffromani force-pushed the pci-expose-numa-node branch from f11d823 to 783de03 Compare February 11, 2021 15:57
Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

@fromanirh I'm happy with this, all looks good to me. Are we good to merge this one?

pkg/pci/pci.go Outdated
@@ -39,6 +40,9 @@ type Device struct {
Subclass *pcidb.Subclass `json:"subclass"`
// optional programming interface
ProgrammingInterface *pcidb.ProgrammingInterface `json:"programming_interface"`
// Topology node that the graphics card is affined to. Will be nil if the
Copy link
Owner

Choose a reason for hiding this comment

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

s/graphics card/PCI device/

:)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, copy/paste strikes again :)

// NewWithContext returns a pointer to an Info struct that contains information about
// the NUMA topology on the host system. Use this function when you want to consume
// the topology package from another package (e.g. pci, gpu)
func NewWithContext(ctx *context.Context) (*Info, error) {
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@ffromani
Copy link
Collaborator Author

hi Jay! We can merge this PR (pending me addressing your comments :) ) with the caveat that ghw-snapshot cannot create valid snapshot to exercise the code added here (e.g. in the tests) until #224 is merged

We want to expose the NUMA locality of the PCI devices,
much like we already do for GPU devices.
This is very important for high-end, high-performance devices
(NICs, storage controllers).

To enable testing, we update the snapshot with another one
captured with more PCI device informations.
See: jaypipes#224

Signed-off-by: Francesco Romani <[email protected]>
@ffromani ffromani force-pushed the pci-expose-numa-node branch from 783de03 to 6a1e32f Compare February 23, 2021 16:49
@ffromani
Copy link
Collaborator Author

And btw, after some trial/errors, #224 reached a form I'm comfortable with, and requires just a minor followup now.

Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

👍 nice work Francesco

@jaypipes jaypipes merged commit 56be4ac into jaypipes:master Feb 24, 2021
@ffromani ffromani deleted the pci-expose-numa-node branch May 24, 2021 06:53
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.

2 participants