All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Yijing Wang <wangyijing@huawei.com>, Jon Mason <jdmason@kudzu.us>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Hanjun Guo <guohanjun@huawei.com>,
	Jiang Liu <jiang.liu@huawei.com>, Jin Feng <joe.jin@oracle.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 6/6] PCI: update device mps when doing pci hotplug
Date: Fri, 30 Aug 2013 09:41:00 -0600	[thread overview]
Message-ID: <CAErSpo69TBOz6FJv8gPoAA9GFdJLuxyZWPy6gPHRbBAZKN047Q@mail.gmail.com> (raw)
In-Reply-To: <CAE9FiQVXri56BzLviVjSPnqQvo25Q36AA26V_28kfy_=9EunjA@mail.gmail.com>

On Thu, Aug 29, 2013 at 4:46 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Thu, Aug 29, 2013 at 3:22 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>
>> Note that I think Linux *should* eventually actively manage MPS, and
>> when it does, case 3 should "just work".  I just don't understand what
>> the point of the BIOS using case 3 is.
>>
>> I suppose other OSes must get better performance in this "auto" mode?
>
> Yes.

My take on this is that "auto" mode really means "Windows" mode,
because it's a BIOS workaround for shortcomings in Windows.  It's
tailored to do system-wide MPS configuration that Windows doesn't do,
while relying on Windows to do minimal reconfiguration after a
hot-plug.  I don't feel any particular urgency to make Linux work with
that.

In my opinion, a BIOS should configure the machine in the safest
possible way.  Then everything works, and if we boot an OS that is
smart enough to reconfigure it in a more optimal way, that's great,
but it's not required.  For MPS, I think that means configuring the
machine as I outlined in case 1 (MPS=128 always) or case 2 (larger MPS
allowed on non-hotplug paths if the BIOS knows the root complex splits
packets).

>> (What exactly is that mode, anyway?)  That means the other OS must be
>> smart enough to deal with hotplug device replacement, but not smart
>> enough to configure MPS all by itself starting from scratch.  I don't
>> know what rules would tell us "this MPS must be configured by the BIOS
>> and the OS should leave it alone" and "the OS must configure MPS on
>> this device for hotplug."  How can we make sense out of that?
>
> So my suggestion:
> We scan mps of in the bridges to find out if any is set to other than 128.
> if there is any bridge that mps is not 128 and it is hotplug slot.
> We change to PCI_BUS_TUNE_PERF for that system.

That seems too arbitrary and magic to me.  I don't really want to set
modes based on what we discover in the machine.  If we're going to do
MPS config, we should just do it right and do it everywhere.

This discussion is not really going anywhere because we don't have any
concrete changes on the table, so I'm going to try to resist
continuing this thread :)

Bjorn

  reply	other threads:[~2013-08-30 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 21:09 [PATCH v8 6/6] PCI: update device mps when doing pci hotplug Bjorn Helgaas
2013-08-29 21:47 ` Yinghai Lu
2013-08-29 22:22   ` Bjorn Helgaas
2013-08-29 22:46     ` Yinghai Lu
2013-08-30 15:41       ` Bjorn Helgaas [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-08-22  3:24 [PATCH v8 0/6] Update device MPS Yijing Wang
2013-08-22  3:24 ` [PATCH v8 6/6] PCI: update device mps when doing pci hotplug Yijing Wang
2013-08-22 18:18   ` Bjorn Helgaas
2013-08-26  3:42     ` Yijing Wang
2013-08-26 21:33       ` Bjorn Helgaas
2013-08-27  0:39         ` Yinghai Lu
2013-08-27  1:49         ` Yijing Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAErSpo69TBOz6FJv8gPoAA9GFdJLuxyZWPy6gPHRbBAZKN047Q@mail.gmail.com \
    --to=bhelgaas@google.com \
    --cc=guohanjun@huawei.com \
    --cc=jdmason@kudzu.us \
    --cc=jiang.liu@huawei.com \
    --cc=joe.jin@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=wangyijing@huawei.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.