From: Jason Yan <yanaijie@huawei.com>
To: Cong Wang <xiyou.wangcong@gmail.com>, John Garry <john.garry@huawei.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>,
LKML <linux-kernel@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Praveen Murali <pmurali@logicube.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
chenxiang <chenxiang66@hisilicon.com>
Subject: Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()
Date: Fri, 8 Dec 2017 15:54:54 +0800 [thread overview]
Message-ID: <5A2A454E.6050108@huawei.com> (raw)
In-Reply-To: <CAM_iQpVWmeq5BMvxJmD2FP6Zm6s7O05+NqzYQ6uCAp7iE1asnw@mail.gmail.com>
On 2017/12/8 6:57, Cong Wang wrote:
> On Thu, Dec 7, 2017 at 5:37 AM, John Garry <john.garry@huawei.com> wrote:
>> On 28/11/2017 17:04, Cong Wang wrote:
>>>
>>> I don't understand, the only caller of sas_unregister_domain_devices()
>>> is sas_deform_port().
>>>
>>
>> And sas_deform_port() may be called from another worker on the same queue,
>> right? As in sas_phye_loss_of_signal()->sas_deform_port()
>
> Oh, good catch! I didn't notice this subtle call path.
>
> Do you have any better idea to fix this? We saw this on 4.9 too.
>
We have sent a patchset to fix this and to enhance libsas hotplug.
Please refer to https://lkml.org/lkml/2017/9/6/142
And I'm going to send a new version soon.
Jason
>>
>> The device destruct takes place in a separate worker from which
>> sas_deform_port() is called, but the same queue. So we have this queued
>> destruct happen after the port is fully deformed -> hence the WARN.
>>
>> I guess you only tested your patch on disks attached through an expander.
>
> I have very limited scsi hardware, so my testing is limited too.
>
> .
>
next prev parent reply other threads:[~2017-12-08 7:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 0:24 [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices() Cong Wang
2017-11-28 8:20 ` Johannes Thumshirn
2017-11-28 11:18 ` John Garry
2017-11-28 11:18 ` John Garry
2017-11-28 17:04 ` Cong Wang
2017-12-07 13:37 ` John Garry
2017-12-07 22:57 ` Cong Wang
2017-12-08 0:40 ` Cong Wang
2017-12-08 1:04 ` Cong Wang
2017-12-08 7:54 ` Jason Yan [this message]
2017-12-09 19:51 ` Cong Wang
2017-11-28 17:00 ` Cong 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=5A2A454E.6050108@huawei.com \
--to=yanaijie@huawei.com \
--cc=chenxiang66@hisilicon.com \
--cc=dan.j.williams@intel.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=john.garry@huawei.com \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=pmurali@logicube.com \
--cc=xiyou.wangcong@gmail.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 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.