-
Notifications
You must be signed in to change notification settings - Fork 113
fix up remaining issues with pci hotplug and uevent listening #380
Conversation
/test |
Codecov Report
@@ Coverage Diff @@
## master #380 +/- ##
==========================================
+ Coverage 46.47% 46.51% +0.04%
==========================================
Files 16 16
Lines 2498 2498
==========================================
+ Hits 1161 1162 +1
+ Misses 1186 1185 -1
Partials 151 151 |
device.go
Outdated
@@ -36,6 +36,7 @@ var ( | |||
sysBusPrefix = "/sys/bus/pci/devices" | |||
pciBusPathFormat = "%s/%s/pci_bus/" | |||
systemDevPath = "/dev" | |||
pciBusRescanPath = "/sys/bus/pci/rescan" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is in grpc.go
pciBusRescanFile
device.go
Outdated
fieldLogger.Info("Device found on pci device path") | ||
return "", nil | ||
// Rescan pci bus if we need to wait for a new pci device | ||
if err = ioutil.WriteFile(pciBusRescanPath, []byte{'1'}, 0200); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use pciBusMode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or could you implement a new function here to rescan the PCI bus and use it in grpc.go
?
…ing" We should not check for the sysfs path assciated with the PCI address as the device node may still not be created. Only a uevent with a device name associated indicates that the device is ready. This change was also causing the sandbox lock to be not released causing the uevent listening loop to be locked permanently. This reverts commit 7caf1c8. Fixes kata-containers#379 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Otherwise the channel we are waiting on is not the one we put in the device watchers map. Fixes: kata-containers#372 Signed-off-by: Peng Tao <bergwolf@gmail.com>
So that we make sure the device pci kobject shows up. Signed-off-by: Peng Tao <bergwolf@gmail.com>
@devimc updated. PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@sboeuf PTAL. I think scanning the PCI bus is ok till we find out the qemu issue for SHPC hotplug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's fine for now.
I've just restarted the metrics build. |
The metrics failure doesn't seem to relate to this PR. I created kata-containers/tests#763 to track it.
|
Ignore the non-related metrics failure. let's merge it |
Thanks @gnawux - already aware of the perf item - we have an issue over at kata-containers/ci#43 as well.
What I've been seeing over the last week is too much variance in the metrics results, and I'm not sure why yet. I would not normally expect either memory footprint or boot times to vary so much - which is why I have the pass/fail boundaries set at 5% - but we see here boot times were up 10%, and memory footprint down 12.6%. I need to do some research into what is going on. I just didn't find time yet this week. This is a key reason why the metrics CI's are not marked as 'required' items in Github yet... |
@bergwolf @amshinde @egernst @devimc
So that's the explanation for Note: coldplugging a PCI device to the PCI bridge will have the same effect, forcing the PCI bridge to have it's own BAR space, and further hotplug will work (unless you're hotplugging a PCI device with large BARs).
I hope this helps clarify things :) |
@sboeuf Thanks for summarising our findings. In conclusion: With the current hotplug implementation for Another point to consider with q35 hotplug is that by attaching pcie devices to a pci-bridge we lose out on the pcie capabilities of the device, since the device is exposed as a pci device. We lose out on all the advantages of pcie which we would get with cc @devimc |
thanks @sboeuf , agree to move to |
Fixes: #372
I made this depends on #375 since they both modify the same function and would naturally conflict.