Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-14 Thread wangyijing
Hi, I'm sorry to say that I have to stop the libsas hotplug improvement work, I will resign from Huawei, so I have no time and hardware to continue to work at this issue. John is very familiar with this work, and provide a lot of good suggestions. So if John like, I am glad he could join to

Re: [PATCH v3 4/7] libsas: add sas event wait-complete support

2017-07-14 Thread wangyijing
在 2017/7/14 14:51, Hannes Reinecke 写道: > On 07/10/2017 09:06 AM, Yijing Wang wrote: >> Introduce wait-complete for libsas sas event processing, >> execute sas port create/destruct in sync. >> >> Signed-off-by: Yijing Wang >> CC: John Garry >> CC:

Re: [PATCH v3 7/7] libsas: release disco mutex during waiting in sas_ex_discover_end_dev

2017-07-13 Thread wangyijing
在 2017/7/14 0:10, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> Disco mutex was introudced to prevent domain rediscovery competing >> with ata error handling(87c8331). If we have already hold the lock >> in sas_revalidate_domain and sync executing probe, deadlock caused, >>

Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-13 Thread wangyijing
在 2017/7/13 16:08, John Garry 写道: > On 13/07/2017 02:37, wangyijing wrote: >>> > So much nicer. BTW, /dev/sdb is a SATA disk, the rest are SAS. >> Oh, I take a mistake ? The result you tested the hotplug which applied this >> patchset is fine ? >> >> Tha

Re: [PATCH v3 5/7] libsas: add a new workqueue to run probe/destruct discovery event

2017-07-12 Thread wangyijing
在 2017/7/13 0:50, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> Sometimes, we want sync libsas probe or destruct in sas discovery work, >> like when libsas revalidate domain. We need to split probe and destruct >> work from the scsi host workqueue. >> >> Signed-off-by: Yijing Wang

Re: [PATCH v3 6/7] libsas: add wait-complete support to sync discovery event

2017-07-12 Thread wangyijing
在 2017/7/12 21:51, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> >> static void sas_chain_event(int event, unsigned long *pending, >> @@ -592,9 +596,9 @@ int sas_discover_event(struct asd_sas_port *port, enum >> discover_event ev) >> { >> struct sas_discovery *disc; >> >> +

Re: [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-12 Thread wangyijing
There is no special meaning for the pool size, if flutter of > 25 events, notify sas events will return error, and the further step work is depending on LLDD drivers. I hope libsas could do more work in this case, but now it seems a little difficult, this patch may be a

Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-12 Thread wangyijing
在 2017/7/12 17:59, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> This patchset is based Johannes's patch >> "scsi: sas: scsi_queue_work can fail, so make callers aware" >> >> Now the libsas hotplug has some issues, Dan Williams report >> a similar bug here before >>

Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-12 Thread wangyijing
在 2017/7/12 17:59, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> This patchset is based Johannes's patch >> "scsi: sas: scsi_queue_work can fail, so make callers aware" >> >> Now the libsas hotplug has some issues, Dan Williams report >> a similar bug here before >>

Re: [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-12 Thread wangyijing
在 2017/7/12 16:17, John Garry 写道: > On 12/07/2017 03:06, wangyijing wrote: >>>> -unsigned long port_events_pending; >>>> -unsigned long phy_events_pending; >>>> +struct asd_sas_event port_events[PORT_POOL_SIZE]; >>>> +

Re: [PATCH v3 2/7] libsas: remove unused port_gone_completion

2017-07-11 Thread wangyijing
在 2017/7/11 23:54, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> No one uses the port_gone_completion in struct asd_sas_port, >> clean it out. > > This seems like a reasonable tidy-up patch which could be taken in isolation, > having no dependency on the rest of the series. Yes.

Re: [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-11 Thread wangyijing
>> -unsigned long port_events_pending; >> -unsigned long phy_events_pending; >> +struct asd_sas_event port_events[PORT_POOL_SIZE]; >> +struct asd_sas_event phy_events[PHY_POOL_SIZE]; >> >> int error; > > Hi Yijing, > > So now we are creating a static pool of events per

Re: [PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-15 Thread wangyijing
在 2017/6/15 16:00, John Garry 写道: > On 15/06/2017 08:37, wangyijing wrote: >> >> >> 在 2017/6/14 21:08, John Garry 写道: >>> On 14/06/2017 10:04, wangyijing wrote: >>>>>> static void notify_ha_event(struct sas_ha_struct *sas_ha, enum ha_event

Re: [PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-15 Thread wangyijing
在 2017/6/14 21:08, John Garry 写道: > On 14/06/2017 10:04, wangyijing wrote: >>>> static void notify_ha_event(struct sas_ha_struct *sas_ha, enum ha_event >>>> event) >>>> >> { >>>> >> +struct sas_ha_

Re: [PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-14 Thread wangyijing
在 2017/6/14 17:18, Johannes Thumshirn 写道: > On 06/14/2017 11:04 AM, wangyijing wrote: >>>> static void notify_ha_event(struct sas_ha_struct *sas_ha, enum ha_event >>>> event) >>>> { >>>> + struct sas_ha_event *ev; >>>> + >>

Re: [PATCH v2 2/2] libsas: Enhance libsas hotplug

2017-06-14 Thread wangyijing
>> In this patch, we try to solve these issues in following steps: >> 1. create a new workqueue used to run sas event work, instead of scsi host >> workqueue, >>because we may block sas event work, we cannot block the normal scsi >> works. >>When libsas receive a phy down event,

Re: [PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-14 Thread wangyijing
>> static void notify_ha_event(struct sas_ha_struct *sas_ha, enum ha_event >> event) >> { >> +struct sas_ha_event *ev; >> + >> BUG_ON(event >= HA_NUM_EVENTS); >> >> -sas_queue_event(event, _ha->pending, >> -_ha->ha_events[event].work, sas_ha); >> +ev =

Re: [PATCH 2/2] libsas: Enhance libsas hotplug

2017-05-25 Thread wangyijing
Hi John, thanks for your review and comments! 在 2017/5/25 17:04, John Garry 写道: > Hi, > > There are some comments, inline. > > In general, if it works, it looks ok. > > Other reviews would be greatly appreciated - Hannes, Christoph, Johannes, Dan > - please. > >> Libsas complete a hotplug

Re: [PATCH 1/2] libsas: Don't process sas events in static works

2017-05-23 Thread wangyijing
>> > > I have seen this scenario on our development board when we have a bad > physical cable connection - the PHY continually goes up and down in a loop. > > So, in this regard, it is worth safeguarding against this scenario. OK, I will reconsider this case. Thanks! Yijing. > > John > >

Re: [PATCH 1/2] libsas: Don't process sas events in static works

2017-05-21 Thread wangyijing
Hi Dan, thanks for your review and comments! 在 2017/5/21 11:44, Dan Williams 写道: > On Fri, May 19, 2017 at 11:39 PM, Yijing Wang wrote: >> Now libsas hotplug work is static, LLDD driver queue >> the hotplug work into shost->work_q. If LLDD driver >> burst post lots hotplug

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread wangyijing
>> >> Please repost the series against the current tree. Also a cover >> letter with a bit more explanation would be good. >> > > Great, I think that my colleagues can send an updated version next week. I will send a new version with a cover letter these days, before that, we need to do a

Re: [RFC PATCH] scsi: libsas: fix WARN on device removal

2016-11-22 Thread wangyijing
>> >> The events are not lost. > > In sas_queue_event(), if there is a particular event pending for a port/PHY, > we cannot queue further same event types for that port/PHY. I think my > colleagues found issue where we try to enqueue multiple complementary events. Yes, we found this issue in

Re: [RFC PATCH] scsi: libsas: fix WARN on device removal

2016-11-11 Thread wangyijing
>>> I have not seen the flutter issue. I am just trying to solve the horrible >>> WARN dump. >>> However I do understand that there may be a issue related to how we queue >>> the events; there was a recent attempt to fix this, but it came to nothing: >>>

Re: [RFC][PATCH v2 0/2] Improve libsas hotplug

2016-11-11 Thread wangyijing
Hi James, sorry to bother you, these two patches try to fix several issues in libsas, Dan Williams and John Garry also found similar issue, and post some patches before. Dan Williams's solution fix the sysfs warning calltrace, but may introduce new flutter issue. In these two patches, we

Re: [RFC PATCH] scsi: libsas: fix WARN on device removal

2016-11-11 Thread wangyijing
> > They're not the same. I don't see how your solution properly deals with > remote sas_port deletion. > > When we unplug a device connected to an expander, can't the sas_port be > deleted twice, in sas_unregister_devs_sas_addr() from domain revalidation and > also now in

Re: Question for Patch"libsas: fix "sysfs group not found" warnings at port teardown time"

2016-02-05 Thread wangyijing
Yes, it seems to be the same issue. 在 2016/2/6 1:22, Dāvis Mosāns 写道: > 2016-02-05 11:20 GMT+02:00 wangyijing <wangyij...@huawei.com>: >> >> Hi Dan and Praveen, >>I found a patch titled "libsas: fix "sysfs group not found" warnings at >> po

Warning Calltrace when hotplug sas disk

2016-02-04 Thread wangyijing
Hi list, I tried to hotplug disk in my machine, but when I hot remove the disk, I found some warning calltrace. When we try to unplug a disk, The lldd report a loss_of_singal event to sas, so sas_deform_port sas_unregister_domain_devices sas_unregister_dev