Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2622772iog; Mon, 20 Jun 2022 00:40:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sOq6pIZWQo5Fdm+fosevdbHoZUGgMUf5AeFu0dLiATA5ZFcwOHIU1Q+XmQCkJI2TH483VW X-Received: by 2002:a63:7f0e:0:b0:40c:7999:12d2 with SMTP id a14-20020a637f0e000000b0040c799912d2mr9700887pgd.566.1655710843942; Mon, 20 Jun 2022 00:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655710843; cv=none; d=google.com; s=arc-20160816; b=AwMviVY2zKNlDXveqxC1gpCr/rXtsMYkIdS7tvO4biq0McBUUXMnyQgRCmSUhPlvGB ysy52rsM7kRiCAg3t93WovJ8kZfbPuLMyl18E9ZAp+fYF/eLk2McTeAtG/8tt/Gjo23N hP+6SF9+EO1eouMF9HDMfK5yZFul8ADT8Qg3wOqGXrceYy0CpmLLCtGqyhqkUcKE1DOe xBjmBvkTaMGhShS6YDuAd2JQUIn3wBWEzq1Vyx+zxIWm8LQ3AXDpO2yv193BXvxMOTgC skfET7gGvohR+MYFgAhMHEjXe8kxPjx6gpYcHrvNa+dEuryOR/aPmLzeSL2SHccGLtTh PCGQ== 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:dkim-signature:dkim-signature; bh=3H0q16aW3kW6fA8kDkHl20jQtDM1dBpQuVhUTEIizdo=; b=Wte80GYS5yWLCpFitmA75uI/ItROA8BJavT53wj/A0nKJGKRSAzzh9u6iX4/1OOU61 3JDEWot2aPnWn/ki4mprE1xfp/j5CPK/n/QSBX1R8wx3cI8rt8/vrtYFDlVMJfON7uLi CjHDirzo6vBCX+HUK/wcrpHazfI55yfX7gWrGrGrfpZdAhoEbkCMS4nvkWy9+h6wozMp yvxfxY5AovCYHLz8Vh2EU6wDhW45rLNc8n0UHUZYCjtv2y/qc7QuE20MHiJYRxO+PClH oYG5l6YvmYXl2vfMahOaZGERoVj0//Snp8vijxy982Q5zzOkoFWtWFmdiSv/rcH+WSMR Wkzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=V6T2dTKj; dkim=neutral (no key) header.i=@suse.de; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p8-20020a63f448000000b003c5a1baf6acsi15447470pgk.503.2022.06.20.00.40.31; Mon, 20 Jun 2022 00:40:43 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=V6T2dTKj; dkim=neutral (no key) header.i=@suse.de; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239051AbiFTHDx (ORCPT + 99 others); Mon, 20 Jun 2022 03:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234071AbiFTHDw (ORCPT ); Mon, 20 Jun 2022 03:03:52 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5007AF75; Mon, 20 Jun 2022 00:03:51 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0DEC921BDE; Mon, 20 Jun 2022 07:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1655708630; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3H0q16aW3kW6fA8kDkHl20jQtDM1dBpQuVhUTEIizdo=; b=V6T2dTKjkLceY7I3m7AS1zeyrKzHlkZ9INvM0Kls8dGXwdzOWLJiriTPp1yCJ2hStCsu6M uUWC3J9mWoZtlwC6iI7jCuOe7sM9AnutT5bxhYMgXgqoPwIDXF3x0bn93baPeEi+ehyGBs P30bghw/ONtNOd8pDUAWXDdjEsrgRi4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1655708630; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3H0q16aW3kW6fA8kDkHl20jQtDM1dBpQuVhUTEIizdo=; b=BsrLKLG69OQGGSXaQr7EPXGS0C1nG9EcaAGRKyp3XBa7WM9yvgZbXaLu2GJ2mOJw590uk1 hE8/X9o0CKKP84Cw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BA17D134CA; Mon, 20 Jun 2022 07:03:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id zmdkKtQbsGKtegAAMHmgww (envelope-from ); Mon, 20 Jun 2022 07:03:48 +0000 Message-ID: <2ea41701-8be5-f981-d178-0d8e703962e0@suse.de> Date: Mon, 20 Jun 2022 09:03:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH RFC v2 03/18] scsi: core: Implement reserved command handling Content-Language: en-US To: Christoph Hellwig Cc: Damien Le Moal , John Garry , axboe@kernel.dk, jejb@linux.ibm.com, martin.petersen@oracle.com, brking@us.ibm.com, linux-block@vger.kernel.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, chenxiang66@hisilicon.com References: <1654770559-101375-1-git-send-email-john.garry@huawei.com> <1654770559-101375-4-git-send-email-john.garry@huawei.com> <88d192b5-741b-7104-7f72-0178aa18bafb@suse.de> <20220620062828.GA10753@lst.de> From: Hannes Reinecke In-Reply-To: <20220620062828.GA10753@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 6/20/22 08:28, Christoph Hellwig wrote: > On Mon, Jun 20, 2022 at 08:24:24AM +0200, Hannes Reinecke wrote: >> So my idea for SATA is simply _not_ to use reserved tags. >> Any TMF functions (or the equivalent thereof) should always be sent as >> non-NCQ commands. And when doing so we're back to QD=1 on SATA anyway, so >> there _must_ be tags available. Consequently the main reason for having >> reserved tags (namely to guarantee that tags are available for TMF) doesn't >> apply here. > > At least in the non-elevator case (which includes all passthrough I/O) > request have tags assigned as soon as they are allocated. So, we > absolutely can have all tags allocated and then need to do a TMF. SATA internals may come to the rescue here; if there's an error all NCQ commands are aborted. So we'll get at least one command tag back. As for the command duration limits I'm still waiting for clarification from Damien if we can reuse tags there. But I do agree it's ugly. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman