From patchwork Sat Dec 24 05:24:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 36391 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp25058wrt; Fri, 23 Dec 2022 21:40:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJO02DDI2JVSKjX6eJhtIwMzZsNqHUOr9QbOzsitgT0bayR8uPK3c/w7dVd78dJIz8/OIe X-Received: by 2002:a17:907:8744:b0:7c1:277:cb05 with SMTP id qo4-20020a170907874400b007c10277cb05mr12447027ejc.6.1671860409012; Fri, 23 Dec 2022 21:40:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671860408; cv=none; d=google.com; s=arc-20160816; b=f1VZ3C60X3v+gAaadGCDnt9Uz+pA/SRCAbKXtAM3bWrcRc9SUHWhpbQhs/M7koR7pC WKS0Jzd6/rEqu09qeHfiRt3OgshXmgaF+qUsHXSH21YT0w/j2eJDw02OWobFKAjjytuQ B1uWYMphewGgI5KWGPTDlXsd0cR3fIY0fautciO1uznz825JmQRrzVpMKtXo7dhJVVvz TFFRzgM9op91S0kyZAqdMUlr73yqDwPkVNAYFOigpxZcvHeb794pGrifWdc0PkGYXN+a hXrGG2f8MnnirgHp1Ar5wcySLvVmHXVaQsLr8qNfqzvp8qGssKHvQOHdEXlQOFep0Val 1Cbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=BvE2awRwFzFbxJ18OKrhIqmcucLQ6AvTFfNUPm7G5WM=; b=aYncFzLqs26HpDM/S6f/305+5OZVIBqFL9J8odFmF0ag1TQjZZjxwRSz6BizXviGo/ 8d0OKCqAFHBn8S8UHMvhzbZfAc/9+nNR4aoZEO9u/yL+n0XVoYCh/pi96fJ5x0q8rNDK wzvIHeQzTFTq7wKjxl2XMzhjSCtKZjR2/ztPLlmBjK34bKroGRzynT0Q5e+lzQYX05Sk MiG4IXr8JGmIhd5mBl7qJBgd3JAPg99NX6kQSJkVCquPVB4Y1YHeoma3vwlSkV9DAO1h deh+HJqfkELiCQw3WxHwYtD7W+JC/zZXhpbgviF8UFXVYi3NTB9O6vIKCM6/xz3/Of12 9z6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="k6yGb/e8"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a170906a40200b0082ad5e78975si3221028ejz.803.2022.12.23.21.39.43; Fri, 23 Dec 2022 21:40:08 -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=@google.com header.s=20210112 header.b="k6yGb/e8"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231134AbiLXFZL (ORCPT + 99 others); Sat, 24 Dec 2022 00:25:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbiLXFZJ (ORCPT ); Sat, 24 Dec 2022 00:25:09 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081FEBE11 for ; Fri, 23 Dec 2022 21:25:08 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id j16so5163030qtv.4 for ; Fri, 23 Dec 2022 21:25:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=BvE2awRwFzFbxJ18OKrhIqmcucLQ6AvTFfNUPm7G5WM=; b=k6yGb/e8VmV5KYVZsTahb9RS1DKkPk395PBpTV6Q0c0DCTyRc82+Q8HoH8NgoHMKlu k0OJAqWW+dtvDsPiUy+FHoe2+HNwiRoRulbbb/udOX5BbqyGakPkGPqYwtw//+x8CJNH LgqkLvXGhZp7vBGd/aGwXhmFxSo/qDjCyUXHaVuYpgTeIrv1fjIQiX83kC67SV+3rW/n Prew+NQNkcr42MsV06oBUb6os+U5uPv4Ocej1jDMD9c3BVENdFVTXiv3gsleYn8W+Tlm fkaLLbvNvYxPcDoryiGUIf4ka6vhmNl57zxitj1ZSgqZX6C55cy+MeUN99MLsdp/X6Ew iPyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BvE2awRwFzFbxJ18OKrhIqmcucLQ6AvTFfNUPm7G5WM=; b=TWgmsJjq1ZVFUYIjIbbpHQWH0EK4p8rItB9asCW0TcTVh6nO8uHQMT2ZY4Bd3+oZAm nGECoabNaHR8UR/F8zJFW4Z6BDPqks/mrJG+Vl6YkiFwN2pJ+4SWEAm+51dzg/gf0NiX pS9ZdA/4kJGGDRgN8rsIVD3+qK5kW53AK6Dd/zkpF9omZSN2I6gAgQcdOp8wuOmKrXS8 tPKc1bu/fVLD3VmtN3MLOFYID/gSYo9BsbaZ6upNxwn3wmB7JArze5kpWQdPUDAeHlH5 WLQohkH5+lRvUGIK+xsW2MFs9Pv3AkhQh2pWcneNSTMQseE1/GqHsWOoVFlxSjPbeubI 3Wxg== X-Gm-Message-State: AFqh2kpmrnkSBUZJusOo5wzcCtBDm7erm+DZzdmn5AEemhFSMUZT7GAe SmknxvDU8G8X+TLNiBU/ymRjdA== X-Received: by 2002:ac8:649:0:b0:3a6:93d7:873f with SMTP id e9-20020ac80649000000b003a693d7873fmr14076523qth.49.1671859507050; Fri, 23 Dec 2022 21:25:07 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id v2-20020a05620a440200b006fed2788751sm3654004qkp.76.2022.12.23.21.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 21:25:06 -0800 (PST) Date: Fri, 23 Dec 2022 21:24:56 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Christoph Hellwig cc: Jens Axboe , Keith Busch , Sagi Grimberg , Chaitanya Kulkarni , Linus Torvalds , Thorsten Leemhuis , linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: 6.2 nvme-pci: something wrong Message-ID: <572cfcc0-197a-9ead-9cb-3c5bf5e735@google.com> MIME-Version: 1.0 X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753072700330947579?= X-GMAIL-MSGID: =?utf-8?q?1753072700330947579?= Hi Christoph, There's something wrong with the nvme-pci heading for 6.2-rc1: no problem booting here on this Lenovo ThinkPad X1 Carbon 5th, but under load... nvme nvme0: I/O 0 (I/O Cmd) QID 2 timeout, aborting nvme nvme0: I/O 1 (I/O Cmd) QID 2 timeout, aborting nvme nvme0: I/O 2 (I/O Cmd) QID 2 timeout, aborting nvme nvme0: I/O 3 (I/O Cmd) QID 2 timeout, aborting nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: Abort status: 0x0 nvme nvme0: I/O 0 QID 2 timeout, reset controller ...and more, until I just have to poweroff and reboot. Bisection points to your 0da7feaa5913 ("nvme-pci: use the tagset alloc/free helpers") And that does revert cleanly, giving a kernel which shows no problem. I've spent a while comparing old nvme_pci_alloc_tag_set() and new nvme_alloc_io_tag_set(), I do not know my way around there at all and may be talking nonsense, but it did look as if there might now be a difference in the queue_depth, sqsize, q_depth conversions. I'm running load successfully with the patch below, but I strongly suspect that the right patch will be somewhere else: over to you! Hugh --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -4926,7 +4926,7 @@ int nvme_alloc_io_tag_set(struct nvme_ct memset(set, 0, sizeof(*set)); set->ops = ops; - set->queue_depth = ctrl->sqsize + 1; + set->queue_depth = ctrl->sqsize; /* * Some Apple controllers requires tags to be unique across admin and * the (only) I/O queue, so reserve the first 32 tags of the I/O queue.