Re: [PATCH] pciehp: fast unplug for virtual machines

From: Gerd Hoffmann
Date: Fri Nov 12 2021 - 06:29:16 EST


Hi,

> "Virtual" doesn't seem like quite the right descriptor here. That's
> one use case, but I think the parameter should describe the actual
> *effect*, not the use case, e.g., something related to the delay after
> the attention button.

Well, it's enabled only for virtual pcie ports because I could hardly
enable it by default otherwise.

There is another delay in remove_board(), mst suggests removing that
too, and that surely would be something we can't do on physical
hardware ...

So I'd prefer to keep the name.

> If it's practical, I think it would be nicer to have a sysfs attribute
> instead of a kernel boot parameter. Then we wouldn't have to reboot
> to change this, and it could be generalized to allow arbitrary delays,
> i.e., no delay, 5 seconds, or whatever the admin decides.

It's a module parameter so will show up in
/sys/module/pciehp/parameters/ and it is writable by root.

[ will address the other things mentioned in v2 ].

take care,
Gerd