Re: [PATCH 3/3] PCI: Change MPS default to "match upstream bridge"

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

 



On Mon, Aug 24, 2015 at 9:13 AM, Keith Busch <keith.busch@xxxxxxxxx> wrote:
> On Fri, 21 Aug 2015, Bjorn Helgaas wrote:
>>
>> On Fri, Aug 21, 2015 at 8:08 AM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
>> wrote:
>>>
>>> Change the default MPS tuning policy to "default," which means we set
>>> every
>>> device's MPS to match its upstream bridge.  Typically this means we'll
>>> preserve the fabric configuration done by firmware, even for hot-added
>>> devices.
>>>
>>> N.B. This effectively re-enables quirk_intel_mc_errata(), which turns off
>>> read completion coalescing on Intel 5000 and 5100 memory controllers.
>>
>>
>> I think this patch might be the wrong thing for quirk_intel_mc_errata().
>>
>> Currently, the default is PCIE_BUS_TUNE_OFF.  In that case, the quirk
>> does nothing, Linux doesn't touch MPS at all, and the BIOS is
>> responsible for avoiding the erratum, either by disabling read
>> coalescing or by avoiding MPS=256.
>>
>> This patch (as-is) means that even if the BIOS set MPS=128, we would
>> disable read coalescing here, which is unnecessary.  The new
>> PCIE_BUS_DEFAULT basically means Linux will set MPS for hot-added
>> devices the same way as for devices present at boot.  That means we
>> should be able to rely on the BIOS workaround and shouldn't have to
>> disable read coalescing.
>>
>> So I think maybe we should bail out of quirk_intel_mc_errata() for
>> both TUNE_OFF and DEFAULT, e.g.,
>>
>> --- a/drivers/pci/quirks.c
>> +++ b/drivers/pci/quirks.c
>> @@ -2862,7 +2862,8 @@ static void quirk_intel_mc_errata(struct pci_dev
>> *dev)
>>        int err;
>>        u16 rcc;
>>
>> -       if (pcie_bus_config == PCIE_BUS_TUNE_OFF)
>> +       if (pcie_bus_config == PCIE_BUS_TUNE_OFF ||
>> +           pcie_bus_config == PCIE_BUS_DEFAULT)
>>                return;
>
>
> Hi Bjorn,
>
> I've successfully tested the previously failing hot-plug tests with your
> pci/enumeration tree.
>
> I don't understand the reported kbuild failure, though. It built
> successfully for me and the error didn't make sense just from looking
> at the patch either, so I hope it was a false alarm.

I couldn't figure that out either, but I reworked them slightly to
squash the last two patches together, and I just got the build success
email.

> Thank you for working on this feature with us. I've no further concerns
> with the most recent implementation, think it looks great and all the
> better for the effort.
>
> Tested-by: Keith Busch <keith.busch@xxxxxxxxx>

Thanks for testing it!  I'll put it into -next today.

Bjorn
--
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