Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1869317rdh; Tue, 26 Sep 2023 06:09:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmo4tbCRWFN6mWbi6EYpKF2/Okn19ChW2oUbrCSwRfpZdF6AQ/yAam9B8wLbnSQs2b6+2h X-Received: by 2002:a05:6358:260e:b0:143:788c:2560 with SMTP id l14-20020a056358260e00b00143788c2560mr10082239rwc.15.1695733785291; Tue, 26 Sep 2023 06:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695733785; cv=none; d=google.com; s=arc-20160816; b=pXPjcbFgP5V/AALNCC/MkxdTEI4ZHSTrk+k67cTSqwZUA0rjm8ma49UTDqH1xfeKdY NjjatP4rKWxatLywRyjkUUGWbJJ1rpSOcmWNnf8I5CidvV94CdHb7pk+GtBju+iN5FIz JU1/GfoIhx5lpX8qBxb92KzaLIUPsG4a3RYKc0YgfVjXxfP/eBHRA67j1/tMWSJuwTUB djLljt7xGUX7TdtgxKJWSdbMP1crDbCYxkx13zmziCzLF2dfqQlAnpNfYK/T4ERjbQNY YhC1kXNyMQwmwIBeMl/wooQGyaxCK+6fpYg3n2AtClYVw5hogmQLVSDtZ4DbOZTaiY3o rsAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=GzTzs5GNfl1wDCbMnG7wlrje0UmV5aFTKJeEc1+KWN0=; fh=xY6zCZnndZ34IOi4JiHn9UGuKF09HkKqybwz6f7VEJY=; b=bpV1SmhXAr4a3aQj+9d/94jyeLaHanRnxlpwXE56CCFEdQ3dANric6oiLV6Kf5Tbio L5Ax3ymT1K7hk9zsz5Ns9TVaEn4nLYI664OExXQN45zGjVbU5mj9QlCMoECsVRTEnf53 jDuOKQEIhRTCAWpDIEd/6Tk3IasedoGRMH57t8oI5M1Q9JPdwapYgwpcFnREMmVuIw7I w+1OxZfPUa47ZECGRwuPvKLvea4/4LcdQNCfStZmXoe00vWgR/bc9+J237B9EmYTgaoc 5Wf63KHWoXwmbUkQcNiOkThPWvXu20mSYLM5g6L0RdpiTnHnHi+xQopXzA7SodLAG5RE FCZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id i3-20020a639d03000000b00584af3ee4a2si1733963pgd.610.2023.09.26.06.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 06:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AB6B180F5F02; Tue, 26 Sep 2023 05:57:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234719AbjIZM5Y (ORCPT + 99 others); Tue, 26 Sep 2023 08:57:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234715AbjIZM5W (ORCPT ); Tue, 26 Sep 2023 08:57:22 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2179210A; Tue, 26 Sep 2023 05:57:14 -0700 (PDT) Received: from kwepemm000012.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Rw08227LKzrT2w; Tue, 26 Sep 2023 20:54:58 +0800 (CST) Received: from [10.174.178.220] (10.174.178.220) by kwepemm000012.china.huawei.com (7.193.23.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 26 Sep 2023 20:57:12 +0800 Message-ID: <06268327-cfed-f266-34a7-fda69411ef2a@huawei.com> Date: Tue, 26 Sep 2023 20:57:11 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [RFC PATCH v2 00/18] scsi: scsi_error: Introduce new error handle mechanism Content-Language: en-US To: Mike Christie , Christoph Hellwig CC: "James E . J . Bottomley" , "Martin K . Petersen" , , Hannes Reinecke , , , References: <20230901094127.2010873-1-haowenchao2@huawei.com> <47bed3cb-f307-ec55-5c28-051687dab1ea@huawei.com> From: Wenchao Hao In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.220] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm000012.china.huawei.com (7.193.23.142) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 05:57:28 -0700 (PDT) On 2023/9/26 1:54, Mike Christie wrote: > On 9/25/23 10:07 AM, Wenchao Hao wrote: >> On 2023/9/25 22:55, Christoph Hellwig wrote: >>> Before we add another new error handling mechanism we need to fix the >>> old one first.  Hannes' work on not passing the scsi_cmnd to the various >>> reset handlers hasn't made a lot of progress in the last five years and >>> we'll need to urgently fix that first before adding even more >>> complexity. >>> >> I observed Hannes's patches posted about one year ago, it has not been >> applied yet. I don't know if he is still working on it. >> >> My patches do not depend much on that work, I think the conflict can be >> solved fast between two changes. > > I think we want to figure out Hannes's patches first. > > For a new EH design we will want to be able to do multiple TMFs in parallel > on the same host/target right? > It's not necessary to do multiple TMFs in parallel, it's ok to make sure each TMFs do not affect each other. For example, we have two devices: 0:0:0:0 and 0:0:0:1 Both of them request device reset, they do not happened in parallel, but would in serial. If 0:0:0:0 is performing device reset in progress, 0:0:0:1 just wait 0:0:0:0 to finish. > The problem is that we need to be able to make forward progress in the EH > path and not fail just because we can't allocate memory for a TMF related > struct. To accomplish this now, drivers will use mempools, preallocate TMF > related structs/mem/tags with their scsi_cmnd related structs, preallocate > per host/target/device related structs or ignore what I wrote above and just > fail. > > Hannes's patches fix up the eh callouts so they don't pass in a scsi_cmnd > when it's not needed. That seems nice because after that, then for your new > EH we can begin to standardize on how to handle preallocation of drivers > resources needed to perform TMFs for your new EH. It could be a per > device/target/host callout to allow drivers to preallocate, then scsi-ml calls > into the drivers with that data. It doesn't have to be exactly like that or > anything close. It would be nice for drivers to not have to think about this > type of thing and scsi-ml just to handle the resource management for us when > there are multiple TMFs in progress. >