Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760632Ab3GaRxw (ORCPT ); Wed, 31 Jul 2013 13:53:52 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:46801 "EHLO mail-oa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894Ab3GaRxu (ORCPT ); Wed, 31 Jul 2013 13:53:50 -0400 MIME-Version: 1.0 In-Reply-To: <51F8D5C9.4020309@huawei.com> References: <1360036520-31032-1-git-send-email-wangyijing@huawei.com> <51A42137.9090908@huawei.com> <51F73108.4070905@huawei.com> <51F8D5C9.4020309@huawei.com> From: Bjorn Helgaas Date: Wed, 31 Jul 2013 11:53:30 -0600 Message-ID: Subject: Re: [PATCH] PCI: update device mps when doing pci hotplug To: Yijing Wang Cc: Jon Mason , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , Yijing Wang , Hanjun Guo , Jiang Liu , Joe Jin Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1929 Lines: 43 On Wed, Jul 31, 2013 at 3:15 AM, Yijing Wang wrote: > Hi Bjorn, > I didn't observe a performance difference between MPS=128 and MPS=512. I use ping $dest_ip -s 65500(large size packet) > to test the different situations. Interesting. "ping" is probably not a good way to see performance differences, but hopefully you could see a difference in *some* scenario. Otherwise, there's not much point in increasing MPS :) >> I assume there are no AER or other errors logged by the root port? > Yes, AER is not support in local machine. Per the 5520/5500 spec, it does support AER (sec 19.11.5). Maybe there's some platform support required in addition. You might still be able to see some info just with "lspci -vv" > Hmmm, PCIe Spec does not involve too much about MPS setting. So maybe different platform > has different strategy. I think there's enough in the spec to tell us what we need to do (this is sec 2.2.2): - A Transmitter must not send a TLP larger than its Max_Payload_Size - A Receiver must treat TLPs larger than its Max_Payload_Size as malformed The only way I can see to guarantee that is to set the MPS on both ends of the link the same. > Conservatively, as a improvement for mps setting after hotplug. I think update mps setting equal to its parent > make sense. This is no harm to other devices, we only modify the hotplug device itself mps register. > > So if you agree, I will update my patch ,only try to modify hotplug device mps, make them equal to its parent. Yes, I think that would be safe. If the switch is set to a larger MPS than the hot-added device supports, I don't think we can safely use the device. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/