Re: [PATCH] PCI: pciehp: Use ordered workqueue for HPC events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Aug 12, 2014 at 3:30 PM, Sandeep S Mann <sandeep@xxxxxxxxxxxxxxx> wrote:
>
>> Did you find this by code inspection, or did you actually observe a
>> problem?  If the latter, what were the symptoms?
>>
>> shpchp does the same thing, so I assume it requires the same fix.
>
> Hi Bjorn,
>
> This issue was observed on a system, where I was experimenting with
> pcie hot-plug and the device being hot plugged is not the most well
> behaved.  It exhibits the following behavior:
>
>   - Initialization of the device can take “relatively” long (order 100s ms)
>   - On hot add the link presence can toggle before stabilizing

Yup, this would be a problem if the work queue was reordered in this case.

>
> The toggle of device presence can generate multiple events on a single
> hot plug, where one hot add event can lead to following events
> ADD->REMOVE->ADD.  And given the device can take some time to initialize,
> we can have three HP events being processed concurrently.

The HP events are actually serialized, but only from the perspective
if PCI subsystem (i.e. once they have been dispatched from the
workqueue):
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=50b52fdee050745935d92e7026373edea2647e60

>
> Also note this seen with surprise ADD and REMOVE.
>

Can you please send lspci -vvvv for the slot? I suspect that your
device has a power controller. In absense of it, the link state
changes would generate HP events regardless of "surprise" bit.

Thanks,

Rajat

> S
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux