Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1819945rdh; Tue, 26 Sep 2023 04:48:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFr51WQ08A0uMWMoyuJKHdxNmw6TTOefnrhnQapE7H7u9CamdKMU8uM6IlvNbXunejBDVPj X-Received: by 2002:a05:6a20:8f1c:b0:15d:721e:44d5 with SMTP id b28-20020a056a208f1c00b0015d721e44d5mr8871391pzk.49.1695728891282; Tue, 26 Sep 2023 04:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695728891; cv=none; d=google.com; s=arc-20160816; b=W6hQdoMDbSy9mwzkkKohlDEPwekNL4Bppv7SMATmfApa6MStWtiVmB4LBt65x101u/ 8TdTzJzWDI0ecYyuaoex8FEOGXiejJdq0ZUnk9mFNfbbrF3O1zTPatrNAGo6r60gs8Ih JCI0vhlu9Y9mLe0PC3vi0hNd65XgNsJoaIOA0ouqfBX711jyAwgpB6cIj3C6NHNzmlV4 FWqKLuUNWqx+B/5GgJKrrAhfMK+fIDQ99u5PzPlH2cD7ARBgpC12YbG3m5qi6x0L5u36 FAe0cm3FguYmN3Aog580o66BLMXefpV6c/ZNDIvbdcg3uzuAMlmsE4cDgT0qumnvGYHh zArA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BhD2k4kv2weMcWpVegjmwrLeUitKOOavmT6dEROSgKg=; fh=xCFgfEC8c2MVTSuSMoQTVkdOdS1h449yv5L8c9y70Tk=; b=hQs7pzQlMbNmJxfSEtNiRXsiA0e765Hrir3zsmRRNH2rjGqyK5FH07diOo8bMJQUGZ WHVXUgud4nCiTJEfi+mb525X97UWsKn7NOALQpTrbDuUmuvyIvALGBo/MIxk5XQFq7Ou ZBl+8wl8/K+DHCgCyykfSLlkLoY+OrCddO/zAEUqqRHfFoOXkL1xLkY6WOBSgQh5q2gM ZXcFE9yaN2p1QZWsV4YCBSklxA76zmSplJIOocHqYbCUoST7Jtq6jD2ahOb9ZrGyCcSK KV5QrOdtB9TsNhLH5M8SbHFJW1oLHCwqO5MIySx8BBmo5XFG92AAnKh5tglmauSgHQIO 5pBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=sVFT0MJc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y6-20020a17090a600600b002775c9ccecasi4613294pji.127.2023.09.26.04.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 04:48:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=sVFT0MJc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DCD988068861; Tue, 26 Sep 2023 00:26:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbjIZH0h (ORCPT + 99 others); Tue, 26 Sep 2023 03:26:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232820AbjIZH0g (ORCPT ); Tue, 26 Sep 2023 03:26:36 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFED6FF; Tue, 26 Sep 2023 00:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BhD2k4kv2weMcWpVegjmwrLeUitKOOavmT6dEROSgKg=; b=sVFT0MJcIgXzs1t914uS8ZgrG1 ZKVz5rYu2XpPkRgaSrZVw6J1Ssio9elzSxEegENXqhC9MgXmnx1U3zDgdsiFetWDwrZ+JvaLreNHm ikVjQkbdeEoD/ltBtrrdUWzQA4pffO6VcGXGHLZzRzopxjYtcpL7TB5DX6QMd6GUwIus85nPWjxfO c+G8vYNn2pAiTO0SJaDOIWyEuLCCfgUovb7xfY48dUMiK6AOXiqp7G09cucspXrhGk4Mic9Dr4Mhd qawZFAtFeHH4SkP0kfqF4JIu7418hwx4TPY3k9PWA3S43M9evo1YOIlIc0i50LxT9jvpW7wxnZ5Km VftH76vA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1ql2Sg-00FnEn-1s; Tue, 26 Sep 2023 07:26:26 +0000 Date: Tue, 26 Sep 2023 00:26:26 -0700 From: Christoph Hellwig To: Mike Christie Cc: Wenchao Hao , Christoph Hellwig , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, Hannes Reinecke , linux-kernel@vger.kernel.org, louhongxiang@huawei.com, lixiaokeng@huawei.com Subject: Re: [RFC PATCH v2 00/18] scsi: scsi_error: Introduce new error handle mechanism Message-ID: References: <20230901094127.2010873-1-haowenchao2@huawei.com> <47bed3cb-f307-ec55-5c28-051687dab1ea@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 26 Sep 2023 00:26:40 -0700 (PDT) On Mon, Sep 25, 2023 at 12:54:48PM -0500, Mike Christie wrote: > I think we want to figure out Hannes's patches first. Yes. > For a new EH design we will want to be able to do multiple TMFs in parallel > on the same host/target right? > > 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. Exactly!