From: Greg KH <gregkh@linuxfoundation.org>
To: Jiang Liu <liuj97@gmail.com>
Cc: Yinghai Lu <yinghai@kernel.org>,
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
Dely Sy <dely.l.sy@intel.com>, Scott Murray <scott@spiteful.org>,
Jiang Liu <jiang.liu@huawei.com>,
Keping Chen <chenkeping@huawei.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH RFC 00/17] Introduce a global lock to serialize all PCI hotplug
Date: Mon, 16 Apr 2012 14:33:51 -0700 [thread overview]
Message-ID: <20120416213351.GA22887@kroah.com> (raw)
In-Reply-To: <1334593751-5916-1-git-send-email-jiang.liu@huawei.com>
On Tue, Apr 17, 2012 at 12:28:54AM +0800, Jiang Liu wrote:
> There are multiple ways to trigger PCI hotplug requests concurrently,
> such as:
> 1. Sysfs interfaces exported by the PCI core subsystem
Which ones?
> 2. Sysfs interfaces exported by the PCI hotplug subsystem
Which ones?
> 3. PCI hotplug events triggered by PCI Hotplug Controllers
> 4. ACPI hotplug events for PCI host bridges
Those are both the same.
> 5. Driver binding/unbinding events
Not really a "hotplug" event, that's something that all drivers in the
kernel support.
And in the end, they all propagate down to the driver core to be the
same thing that the PCI driver sees.
> The PCI core subsystem doesn't support concurrent hotplug operations yet,
> so all PCI hotplug requests should be globally serialized.
Why do you think they are not? These should all be serialized today,
with the bus lock down in the driver core. How is this failing?
> This patchset
> introduces a global recursive rwsem to serialize all PCI hotplug operations.
Ick, why? What's wrong with the lock we are already taking? And why
would you need a rwsem anyway?
> Following PCI hotplug drivers/interfaces have been enhanced with this
> 1. Sysfs interfaces exported by the PCI core subsystem
> 2. Sysfs interfaces exported by the PCI hotplug subsystem
> 3. pciehp
> 4. shpchp
> 5. cpcihp_generic and cpcihp_zt5550
> 6. fakephp
You are doing something wrong if you require this to be fixed up in each
individual pci hotplug driver. Fix this in the PCI core, if needed.
But again, I don't see why it is needed.
> But there are still several TODOs:
> 1) all other PCI hotplug driver in drivers/pci/hotplug directory
> 2) SR-IOV
> 3) acpiphp (plan to do this based on Yinghai's PCI root bus hotplug gate)
> 4) pci_root (plan to do this based on Yinghai's PCI root bus hotplug gate)
>
> Basic test has been done as below, will find more hardwares to do more tests.
> Start three scripts on an Intel Atom system to currently execute:
> 1) remove/rescan PCI devices by sysfs interfaces exported by PCI core subsystem
> 2) remove/rescan PCI devices by sysfs interfaces exported by fakephp driver
> 3) load/unload fakephp driver
> The test has run about four hours without failure.
And it fails without this? How does it?
And really, fakephp? Come on, what happens in the "real world" with
real pci hotplug systems/devices that this patch set is trying to solve?
thanks,
greg k-h
next prev parent reply other threads:[~2012-04-16 21:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 16:28 [PATCH RFC 00/17] Introduce a global lock to serialize all PCI hotplug Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 01/17] PCI: introduce pci_bus_get()/pci_bus_put() to hide PCI implementation details Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 02/17] PCI: introduce recursive rwsem to serialize PCI hotplug operations Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 03/17] PCI: replace pci_remove_rescan_mutex with the PCI hotplug lock Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 04/17] PCI: serialize hotplug operations triggered by PCI hotplug sysfs interfaces Jiang Liu
2012-04-16 16:28 ` [PATCH RFC 05/17] PCI: correctly flush workqueue when destroy pcie hotplug controller Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 06/17] PCI: prepare for serializing hotplug operations triggered by pciehp driver Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 07/17] PCI: serialize hotplug operaitons triggered by the " Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 08/17] PCI: fix two race windows when probing/removing SHPC controller Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 09/17] PCI: correctly flush workqueues and timer when destroy " Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 10/17] PCI: serialize hotplug operaitons triggered by the shpchp driver Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 11/17] PCI: release IO resource in error handling path in cpcihp_generic_init() Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 12/17] PCI: clean up all resources in error handling path in zt5550_hc_init_one() Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 13/17] PCI: trivial code clean up in cpci_hotplug_core.c Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 14/17] PCI: fix race windows when shutting down cpcihp controller Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 15/17] PCI: hold a reference count to the PCI bus used by cpcihp drivers Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 16/17] PCI: serialize PCI hotplug operations triggered " Jiang Liu
2012-04-16 16:29 ` [PATCH RFC 17/17] PCI: serialize PCI hotplug operations triggered by fakephp drivers Jiang Liu
2012-04-16 21:33 ` Greg KH [this message]
2012-04-17 11:57 ` [PATCH RFC 00/17] Introduce a global lock to serialize all PCI hotplug Jiang Liu
2012-04-17 14:53 ` Jiang Liu
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=20120416213351.GA22887@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=chenkeping@huawei.com \
--cc=dely.l.sy@intel.com \
--cc=jiang.liu@huawei.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=scott@spiteful.org \
--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 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).