Re: [PATCH v2 2/3] PCI: Separate stop and remove devices in pciehp

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

 



On Fri, Aug 9, 2013 at 10:04 AM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:

>> Solution would be
>> 1. separating stop and remove in two iterations.
>> 2. or make pci_stop_and_remove_bus_device could be used on VF.
>>
>> This patch is second solution:
>> Separate PF ref releasing from virtfn_remove, all that during
>> pci_destroy_dev for VFs.
>
> I like the second approach better, but I think the call path and
> locking is way too messy:
>
>     virtfn_remove
>       mutex_lock(&iov->dev->sriov->lock)          <--
>       pci_stop_and_remove_bus_device
>         mutex_trylock(&iov->dev->sriov->lock)     <--

yes, original sriov remove code have that, so try to save the lock holding

so if VF is removed directly other than virtfn_remove, those lock still get
hold in the process.

>         pci_stop_bus_device
>         pci_remove_bus_device
>           pci_destroy_dev
>             virtfn_release
>               virtfn_remove_bus
>               pci_dev_put
>
> I think it could be fixed, but it would require significant SR-IOV
> rework, and I'm dubious that we can get it done in time for v3.11.
>
> What would happen if we just reverted dc087f2f6a2 for now?  Jiang?
--
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