Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1081961pxb; Wed, 6 Apr 2022 08:17:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiSPFEz+3IEN08jBJPHC6xHVi9d1PUPyFUckFd9vnCaWWBSdc+WedCBGJW6V0Jq5h3Twl0 X-Received: by 2002:a17:902:f70c:b0:14e:f1a4:d894 with SMTP id h12-20020a170902f70c00b0014ef1a4d894mr9463873plo.65.1649258223626; Wed, 06 Apr 2022 08:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649258223; cv=none; d=google.com; s=arc-20160816; b=ZOacwXQvToyTokI7vO0GpYWoQH0mHu8RQswqj26v7ikELpkNaEw8CBvf5v3q4kLoLj ke8LxJHvc2x2n30yUZdsO3+VnrszQqlXNX2suMZ8m+ofVJ3xhse7IOyfABxQDtAAi7Uz 1JCu3Fz1TAvNG5ONQgOeBq3DuBCNlkkcHyLjvwv9GRy7eK+JlqDzHT5jHgW+f35UqpW9 l4SiF5/c4/BcZMx4bqT7KNO8UGWi+fQiO4j4g1PLDg2gkrxTXsU+vbNNkNz+zElGY43v XZ88Eo4wZNSyPS54+HXyFfKHsi2RNmUG86RspOUaM8uhZp0qywwz9SQ1tUU5EGxh+xNz bNQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from; bh=61Uil5w3luq67Gr1ti97NrliznW0Pllr+MQWKES5n24=; b=i2P/j4z270oHFPeJJ3u37yAGIn0CyxkIoJNVpz2WGfdmssmrEXSe+CkCG57QgOXpRe 1q8EJFmj2YfWIXZFeUc+qzNhKaGBCWAdFpw74KsZfh7M/2MmmHr/NlUAlxhzbDPyfJGE mfMhb3kwScDbAxO45ozpeNzYvwhX7e7887Ll6aorLpRpSbO4t6uBqBORcgSuf0kTF2FB qIznI4uDE76cJxxGdO4xyF5qER7UoCwGn9RpYlZd3yrYUblBw/EUg/fdH0/pAuurmTFE XexnaFMQa/TzioC9iHINKKLCiz2qVcmW2cZ+fGEavZjYESeENJKyy0Dy2jw3xdORlHXv UiOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lx9-20020a17090b4b0900b001bd14e030bcsi6132549pjb.148.2022.04.06.08.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:17:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0A8933D0DF; Wed, 6 Apr 2022 06:09:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232026AbiDFNIt (ORCPT + 99 others); Wed, 6 Apr 2022 09:08:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232656AbiDFNHg (ORCPT ); Wed, 6 Apr 2022 09:07:36 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 665933B3F9B; Wed, 6 Apr 2022 02:41:47 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4KYKHv0kvvz1HBV6; Wed, 6 Apr 2022 17:40:27 +0800 (CST) Received: from dggpemm500017.china.huawei.com (7.185.36.178) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 6 Apr 2022 17:40:53 +0800 Received: from [10.174.178.220] (10.174.178.220) by dggpemm500017.china.huawei.com (7.185.36.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 6 Apr 2022 17:40:52 +0800 From: Wenchao Hao Subject: Re: [REQUEST DISCUSS]: speed up SCSI error handle for host with massive devices To: Hannes Reinecke , Mike Christie , Steffen Maier , , "linux-kernel@vger.kernel.org" , "James E.J. Bottomley" , "Martin K. Petersen" , Lee Duncan , John Garry CC: Wu Bo , Feilong Lin , References: <71e09bb4-ff0a-23fe-38b4-fe6425670efa@huawei.com> <331aafe1-df9b-cae4-c958-9cf1800e389a@huawei.com> <64d5a997-a1bf-7747-072d-711a8248874d@suse.de> <1dd69d03-b4f6-ab20-4923-0995b40f045d@suse.de> <78d41ec1-b30c-f6d2-811c-e0e4adbc8f01@oracle.com> <84b38f16-2a32-f361-43e5-34bce1012e71@oracle.com> <769bcd36-4818-8470-2daa-49ac5c05b33a@suse.de> Message-ID: Date: Wed, 6 Apr 2022 17:40:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <769bcd36-4818-8470-2daa-49ac5c05b33a@suse.de> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.220] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500017.china.huawei.com (7.185.36.178) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/4/4 13:28, Hannes Reinecke wrote: > On 4/3/22 19:17, Mike Christie wrote: >> On 4/3/22 12:14 PM, Mike Christie wrote: >>> We could share code with scsi_ioctl_reset as well. Drivers that support >>> TMFs via that ioctl already expect queuecommand to be possibly in the >>> middle of a run and IO not yet timed out. For example, the code to >>> block a queue and reset the device could be used for the new EH and >>> SG_SCSI_RESET_DEVICE handling. >>> >> >> Hannes or others, >> >> How do parallel SCSI drivers support scsi_ioctl_reset? Is is not fully >> supported and more only used for controlled testing? > > That's actually a problem in scsi_ioctl_reset(); it really should wait for all I/O to quiesce. Currently it just sets the 'tmf' flag and calls into the various reset functions. > > But really, I'd rather get my EH rework in before we're start discussing modifying EH behaviour. > Let me repost it ... > Would you take fast EH(such as single LUN reset) into consideration, maybe a second but lightweight EH? It means a lot. Or give a way drivers can branch out the general timeout and EH handle logic?