Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2163534rwj; Sat, 24 Dec 2022 09:45:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXv/iXunFIafr+WcTHuuGBtvCfthy6RzQOd7yHNLbsJt7uZgPnILZgwpQSt6R2LRs/QhHkJR X-Received: by 2002:a17:907:a641:b0:7c1:4e8f:df2f with SMTP id vu1-20020a170907a64100b007c14e8fdf2fmr12619844ejc.17.1671903959631; Sat, 24 Dec 2022 09:45:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671903959; cv=none; d=google.com; s=arc-20160816; b=dIEwNR+Fp3LFtZShIhpo/Kdtrnjbjbq7WEnZcxWSLOc2C1BDm/foOFbYDH/h3kdphD SwywNbuluBRAaS/rXY22P38kXHkxAKUkebwIMVL7PIzX86Zy0U7qEm83h+19Mu7xs+rA Br2RLLhQzq+KEM2GCiEWmyIZVn2DXxq114jfeeJxwktN7hWSRRJd0XthDwZ/n7XIpF0z keNGu9gb11XwuVPKJD3oB0RysYNVFlbCd5POk3w9Dkez7LBlvIxUO7danO5nbx5ArD7t 7CO2S/wt5GuJSLMLk37rKPy/Yo5J5heNzm0/02ernszmSqeNszaFuKFr6ulMvw1C+s5G Adig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=JpcHNwpuE5O5lhju52DhjRWOVFDf/6KjMwJeJDv0qOk=; b=D5DXALk0uojVJWl/E6iYH3POxK8jKYtp6Z0fXghARaCRGND1qajx5vrDi4MeSuRPUk d5Orm1M90xNwMcmkB+bv5e8425STWD7/Pn0GpV3jJqrDUJ2fqhl7Gm+piX7lIF8KzOgK idXYsHZNdhl40vvqeHIhPxy3Y72qvDgmCCmaDu37SFDyTP3+yR/TLn2ZuLDA3lyjd6u2 3J991F6cvYy7IHhwLMM6DT5pRIeyzANtfaYZ2FY6oN3O90p21FqpMgHzOSSeadEiw9Ta CTYy3cSvQDOepIzlP5yye2FOpqTdgrkivv5sqVy+KfS69veXXSOVBLBCyvdqQv+WrBoD zs8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=eHv1mgQ5; 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 g6-20020a1709065d0600b007c6be26824esi5266821ejt.722.2022.12.24.09.45.44; Sat, 24 Dec 2022 09:45:59 -0800 (PST) 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=@linux-foundation.org header.s=google header.b=eHv1mgQ5; 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 S231376AbiLXQ4q (ORCPT + 66 others); Sat, 24 Dec 2022 11:56:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231367AbiLXQ4o (ORCPT ); Sat, 24 Dec 2022 11:56:44 -0500 Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84AECD116 for ; Sat, 24 Dec 2022 08:56:42 -0800 (PST) Received: by mail-qv1-xf36.google.com with SMTP id r15so4983749qvm.6 for ; Sat, 24 Dec 2022 08:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JpcHNwpuE5O5lhju52DhjRWOVFDf/6KjMwJeJDv0qOk=; b=eHv1mgQ5AP7oglntmJxZbKwRJLD99vZvrbBfFnrC1Jz7Ia5B1JDL0ZVdTe1ypPUTRQ 5WCHLYSZyzzKFMghdQRAE1HIgHcXJ19GaLrYGrmqNcv/IylzDZaqSNbaWFNgXXY8isCb xvyY1lejoB6EYNIgNic+EwyGt+zj1OR7/0hzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JpcHNwpuE5O5lhju52DhjRWOVFDf/6KjMwJeJDv0qOk=; b=lZZQytD9dJNrunNSlku17nYaLF1tJk63/O49WFykGR3VdN+3A5rroFIB7dqJUBhmqe QgZAYzy6lrNiSpjSBddBfkO7XC9TmSb38mDICY3ssaNMobSEBqySsGr2C+ZoujGMsa+w PG2x5Zz5U18TWNlTAskRXdhtFLx5862N2bJsmiGKGayksrPzpbEDwMmRO7BPf/im53o5 FWl01xMeNcUiRcJsn4yL4uFdmO1IdsYEoMZYHyxl9DnW2tw7R6ISbyWuHVkMVoipQbF/ s6BsWoDbakVm/xT+lDHTfj9HKdID0KDY/JWwMiTRCMHTKI5h9lgxv/6jpk4fJ82wmUDg 7/ug== X-Gm-Message-State: AFqh2kpPv38X21sn3LwBl9mXaUUWWQZOTNDKFfi1v/uV3k0pHwdDbS7k oQWGF8TaMyWdTO9vp4B9UKceiXhBHr/07HeG X-Received: by 2002:a05:6214:15c6:b0:4c6:d665:a6ba with SMTP id p6-20020a05621415c600b004c6d665a6bamr34862790qvz.22.1671901001346; Sat, 24 Dec 2022 08:56:41 -0800 (PST) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com. [209.85.160.175]) by smtp.gmail.com with ESMTPSA id bp13-20020a05620a458d00b006fefa5f7fc9sm4353610qkb.134.2022.12.24.08.56.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Dec 2022 08:56:39 -0800 (PST) Received: by mail-qt1-f175.google.com with SMTP id i20so5859059qtw.9 for ; Sat, 24 Dec 2022 08:56:39 -0800 (PST) X-Received: by 2002:ac8:4e26:0:b0:3a7:648d:23d4 with SMTP id d6-20020ac84e26000000b003a7648d23d4mr705942qtw.180.1671900999023; Sat, 24 Dec 2022 08:56:39 -0800 (PST) MIME-Version: 1.0 References: <572cfcc0-197a-9ead-9cb-3c5bf5e735@google.com> In-Reply-To: From: Linus Torvalds Date: Sat, 24 Dec 2022 08:56:23 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: 6.2 nvme-pci: something wrong To: Hugh Dickins Cc: Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Chaitanya Kulkarni , Thorsten Leemhuis , linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Sat, Dec 24, 2022 at 2:19 AM Hugh Dickins wrote: > > Regarding the awful 0's based queue depth: yes, it just looked to me > as if the way that got handled in pci.c before differed from the way > it gets handled in pci.c and core.c now, one too many "+ 1"s or "- 1"s > somewhere. The commit in question seems to replace nvme_pci_alloc_tag_set() calls with nvme_alloc_io_tag_set(), and that has a big difference in how queue_depth is set. It used to do (in nnvme_pci_alloc_tag_set()): set->queue_depth = min_t(unsigned, dev->q_depth, BLK_MQ_MAX_DEPTH) - 1; but now it does (in nvme_alloc_io_tag_set()) set->queue_depth = ctrl->sqsize + 1; instead. So that "set->queue_depth" _seems_ to have historically had that "-1" (that "zero means one" that apparently sqsize also has), but the new code basically undoes it. I don't know the code at all, but this does all seem to be a change (and *very* confusing). The fact that Hugh gets it to work by doint that set->queue_depth = ctrl->sqsize; does seem to match the whole "it used to subtract one" behavior it had. Which is why I assume Hugh tried that patch in the first place. Linus