linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajat Jain <rajatxjain@gmail.com>
To: Sandeep S Mann <sandeep@purestorage.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] PCI: pciehp: Use ordered workqueue for HPC events
Date: Tue, 12 Aug 2014 16:31:03 -0700	[thread overview]
Message-ID: <CAA93t1rZ23dUQ4mJfLaHHdDBzEwnm=oYbv=B4fpYxuDieOapew@mail.gmail.com> (raw)
In-Reply-To: <361417F9-AEA8-4C83-BD04-D5DD8CD4A391@purestorage.com>

Hi,

On Tue, Aug 12, 2014 at 3:30 PM, Sandeep S Mann <sandeep@purestorage.com> 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
>
>

  reply	other threads:[~2014-08-12 23:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 22:47 [PATCH] PCI: pciehp: Use ordered workqueue for HPC events Sandeep Mann
2014-08-04 20:22 ` Rajat Jain
2014-08-12 22:00 ` Bjorn Helgaas
2014-08-12 22:30   ` Sandeep S Mann
2014-08-12 23:31     ` Rajat Jain [this message]
2014-08-13  0:09       ` Sandeep S Mann
2014-08-13  0:33         ` Rajat Jain
2014-08-13 17:00           ` Sandeep S Mann
2014-09-04 21:10 ` Bjorn Helgaas
2014-11-04  8:10   ` Rajat Jain

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='CAA93t1rZ23dUQ4mJfLaHHdDBzEwnm=oYbv=B4fpYxuDieOapew@mail.gmail.com' \
    --to=rajatxjain@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=sandeep@purestorage.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).