From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758130AbdEVJ2r (ORCPT ); Mon, 22 May 2017 05:28:47 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:6792 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757923AbdEVJ2l (ORCPT ); Mon, 22 May 2017 05:28:41 -0400 Subject: Re: [PATCH 1/2] libsas: Don't process sas events in static works To: wangyijing , Dan Williams References: <1495262360-40135-1-git-send-email-wangyijing@huawei.com> <1495262360-40135-2-git-send-email-wangyijing@huawei.com> <59227D16.6000102@huawei.com> CC: "James E.J. Bottomley" , "Martin K. Petersen" , , , linux-scsi , "linux-kernel@vger.kernel.org" , , , , , , , Wei Fang , , Christoph Hellwig , Yousong He , Linuxarm From: John Garry Message-ID: <392354c0-a4a1-99a8-7723-25513efb835c@huawei.com> Date: Mon, 22 May 2017 10:28:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <59227D16.6000102@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.181.157] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.5922AF34.0099,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: ff1982fcadf6bfcd01c1270ff4083f67 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/05/2017 06:54, wangyijing wrote: >> I also think for safety this should use a mempool that guarantees that >> > events can continue to be processed under system memory pressure. > What I am worried about is it's would still fail if the mempool is used empty during memory pressure. > >> > Also, have you considered the case when a broken phy starts throwing a >> > constant stream of events? Is there a point at which libsas should >> > stop queuing events and disable the phy? > Not yet, I didn't find this issue in real case, but I agree, it's really a problem in some broken > hardware, I think it's not a easy problem, we could improve it step by step. > > Thanks! > Yijing. > 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. John From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Garry Subject: Re: [PATCH 1/2] libsas: Don't process sas events in static works Date: Mon, 22 May 2017 10:28:01 +0100 Message-ID: <392354c0-a4a1-99a8-7723-25513efb835c@huawei.com> References: <1495262360-40135-1-git-send-email-wangyijing@huawei.com> <1495262360-40135-2-git-send-email-wangyijing@huawei.com> <59227D16.6000102@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from szxga01-in.huawei.com ([45.249.212.187]:6792 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757923AbdEVJ2l (ORCPT ); Mon, 22 May 2017 05:28:41 -0400 In-Reply-To: <59227D16.6000102@huawei.com> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: wangyijing , Dan Williams Cc: "James E.J. Bottomley" , "Martin K. Petersen" , chenqilin2@huawei.com, hare@suse.com, linux-scsi , "linux-kernel@vger.kernel.org" , chenxiang66@hisilicon.com, huangdaode@hisilicon.com, wangkefeng.wang@huawei.com, zhaohongjiang@huawei.com, dingtianhong@huawei.com, guohanjun@huawei.com, Wei Fang , yanaijie@huawei.com, Christoph Hellwig , Yousong He , Linuxarm On 22/05/2017 06:54, wangyijing wrote: >> I also think for safety this should use a mempool that guarantees that >> > events can continue to be processed under system memory pressure. > What I am worried about is it's would still fail if the mempool is used empty during memory pressure. > >> > Also, have you considered the case when a broken phy starts throwing a >> > constant stream of events? Is there a point at which libsas should >> > stop queuing events and disable the phy? > Not yet, I didn't find this issue in real case, but I agree, it's really a problem in some broken > hardware, I think it's not a easy problem, we could improve it step by step. > > Thanks! > Yijing. > 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. John