From: Yijing Wang <wangyijing@huawei.com>
To: "Kaneshige, Kenji" <kaneshige.kenji@jp.fujitsu.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Yinghai Lu <yinghai@kernel.org>, Rafael <rjw@sisk.pl>,
Rusty Russell <rusty@rustcorp.com.au>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Oliver Neukum <oneukum@suse.de>,
"jiang.liu@huawei.com" <jiang.liu@huawei.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Hanjun Guo <guohanjun@huawei.com>
Subject: Re: [PATCH -v2] PCI, pciehp: make every slot have its own workqueue to avoid deadlock
Date: Mon, 12 Nov 2012 17:04:49 +0800 [thread overview]
Message-ID: <50A0BBB1.8090500@huawei.com> (raw)
In-Reply-To: <4A338DB2991D2A44B9A44B8718AECF650A51E779@G01JPEXMBYT03>
On 2012/11/12 16:51, Kaneshige, Kenji wrote:
>> -----Original Message-----
>> From: Yijing Wang [mailto:wangyijing@huawei.com]
>> Sent: Monday, November 12, 2012 5:28 PM
>> To: Kaneshige, Kenji/金重 憲治
>> Cc: Bjorn Helgaas; Yinghai Lu; Rafael; Rusty Russell; Mauro Carvalho Chehab; Oliver Neukum; jiang.liu@huawei.com;
>> linux-pci@vger.kernel.org; Hanjun Guo
>> Subject: Re: [PATCH -v2] PCI, pciehp: make every slot have its own workqueue to avoid deadlock
>>
>> On 2012/11/12 15:17, Kaneshige, Kenji wrote:
>>>> @@ -94,6 +93,8 @@ static int init_slot(struct controller *ctrl)
>>>> struct hotplug_slot_info *info = NULL;
>>>> struct hotplug_slot_ops *ops = NULL;
>>>> char name[SLOT_NAME_SIZE];
>>>> + char *buffer;
>>>> + int len;
>>>> int retval = -ENOMEM;
>>>>
>>>> hotplug = kzalloc(sizeof(*hotplug), GFP_KERNEL);
>>>> @@ -135,6 +136,19 @@ static int init_slot(struct controller *ctrl)
>>>> if (retval)
>>>> ctrl_err(ctrl,
>>>> "pci_hp_register failed with error %d\n", retval);
>>>
>>> I think it's natural to go to out: here if retval != 0.
>>> I guess you intentionally didn't do that because you might want to do
>>> workqueue cleanup in pciehp_release_ctrl() code path. But it is confusing
>>> and hard to understand.
>>
>> Hi Kaneshige,
>>
>> You are right, go to out here is better.
>
> Just in case, my proposal is the creating workqueue in pcie_init_slot()
> as you did in your first patch.
ok, i will create workqueue in pcie_init_slot() and use pciehp-%u format as workqueue name.
I will send out the next version patch later.
Thanks!
Yijing.
>
>>
>>> In the previous patch, you created the work queue in pcie_init_slot().
>>> I think it's better. Maybe the reason you moved it from pcie_init_slot()
>>> to init_slot() was that you needed the slot name by pci_hp_register().
>>>
>>> How about using physical slot number, which is same as pci slot name by
>>> pci_hp_register() on the normal platform, for the workqueue name instead?
>>>
>>
>> I think use physical slot number is ok, so what about workqueue name like slot(physical slot number) format ?
>>
>> root 45808 0.0 0.0 0 0 ? S< 16:25 0:00 [slot(0)]
>
> I think we need "pciehp" in the name. I prefer "pciehp-%u".
>
> Regards,
> Kenji Kaneshige
>
>
> .
>
--
Thanks!
Yijing
prev parent reply other threads:[~2012-11-12 9:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 8:43 [PATCH -v2] PCI, pciehp: make every slot have its own workqueue to avoid deadlock Yijing Wang
2012-11-12 7:17 ` Kaneshige, Kenji
2012-11-12 8:27 ` Yijing Wang
2012-11-12 8:51 ` Kaneshige, Kenji
2012-11-12 9:04 ` Yijing Wang [this message]
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=50A0BBB1.8090500@huawei.com \
--to=wangyijing@huawei.com \
--cc=bhelgaas@google.com \
--cc=guohanjun@huawei.com \
--cc=jiang.liu@huawei.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-pci@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=oneukum@suse.de \
--cc=rjw@sisk.pl \
--cc=rusty@rustcorp.com.au \
--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.