Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8369515rwi; Tue, 25 Oct 2022 06:02:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4V+MjbHDuaxJ8l7KXimHfARpEHpwlN/3fWZxp2+flDH6iARu7gfJiVWz2CaKOSzISir6Y9 X-Received: by 2002:a63:4307:0:b0:464:a24d:8201 with SMTP id q7-20020a634307000000b00464a24d8201mr33092153pga.116.1666702941974; Tue, 25 Oct 2022 06:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666702941; cv=none; d=google.com; s=arc-20160816; b=KO4Wjne/qN0tKvyKdf/jvTNInYjoldau7KStUOzUJzHjaFWCtSM/7xabxxepMCulBg gX5yU0NLH5h7djFAtzcA1JKx38kpofKFbQjnDb+IBHEPc6H/0ojfvDEb1OOkeLUkhdf5 GfBIfn97LI2CBznQXVKtD4I3Wx6LfxyodEqBmiD6HHmJO2SaC8uWt2C65tl60YpTzD3z rqP7Qx9LOoKIwmBqTFKAWIKP9VAbZU9liZ+p4MEE7lrOCw6tUhI1cIhgR1NyLcpCZZ48 YZIZZ+NuSHhT3V9A24d3G/yX4AA4IGD1/kOPxokX0K6ZvMQWm7wLqe57UAnVp8uKM7OK u71w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=uJomew+21gA6DLBECMSFpfkEyDOc1/rqb0Vayy4XRUo=; b=DatnVKK37G0pcMFsqfMTwe9wk8Dl3UYtfEcOSkB+eP12lKt5rawfNdwEkh7KawqKtY ZnKi8FprcvDUJ6ALBcpEHfg8xpSGxJ84jjHKa/ZxG2LbbfM9zCGz/dd44eZfK8ot6tE+ WGjOmVQ4rJCMxs1KP7i++uUpHFGTWDF+uTo2t5/hsnXdKjwuX40RnrgrKPlcOtERPBiF pUitOWKCMgyi52Ka1HKIJZACN6cJuU9p62nX3xF3ZDXtLiQl/eXkgI2OQ70z55kGCeF6 UONeegLBv9GVi9nr2uqqwUfRwAdSq0QYdXTj5aEGxLQvlaaQjGDRY9EuL0CwV+Juzuhy 2jbA== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ix6-20020a170902f80600b00178b7f8c5c5si2571655plb.598.2022.10.25.06.02.09; Tue, 25 Oct 2022 06:02:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbiJYMdh (ORCPT + 99 others); Tue, 25 Oct 2022 08:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230090AbiJYMdf (ORCPT ); Tue, 25 Oct 2022 08:33:35 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E00CC183E35; Tue, 25 Oct 2022 05:33:34 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id E6C8A68B05; Tue, 25 Oct 2022 14:33:30 +0200 (CEST) Date: Tue, 25 Oct 2022 14:33:30 +0200 From: Christoph Hellwig To: John Garry Cc: Ming Lei , axboe@kernel.dk, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, hch@lst.de, Bart Van Assche Subject: Re: [PATCH] blk-mq: Properly init bios from blk_mq_alloc_request_hctx() Message-ID: <20221025123330.GB10715@lst.de> References: <360c78dc-65ce-362f-389d-075f2259ce5b@huawei.com> <3513b14c-14e0-b865-628e-a83521090de9@huawei.com> <399a2c2d-0b56-e4e7-c309-a6b9537d8939@huawei.com> <05ae5abd-9b96-3ffe-6bd9-e996d28a8897@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05ae5abd-9b96-3ffe-6bd9-e996d28a8897@huawei.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 On Tue, Oct 25, 2022 at 12:36:10PM +0100, John Garry wrote: > The requirement is to send this abort command on same queue as erroneous > command to ensure that they do not race in HW submission, even though > chance of this is really tiny. Maybe we can make low-level driver wait > until erroneous command is really submitted to HW by checking HW register, > etc. before issuing abort on any HW queue (and so would not need > blk_mq_alloc_request_hctx() or similar). I'm not sure this is a good idea. I can think of all kinds of interfaces that could have similar requirements that absolutely do make sense from the hardware / firmware side. So despite Ming not liking blk_mq_alloc_request_hctx there is very little chance of it going away and thus also very little need to avoid users as more will eventually pop up if we want it or not. > BTW, I would still like to fix blk_mq_alloc_request_hctx() to properly init > ->bio and other fields - ok? Yes, it should behave the same blk_mq_alloc_request in that respect, and we should just copy the assignments to bio, biotail, __sector and __data_len from it as you did in your RFC patch. > > Thanks, > John ---end quoted text---