Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2789734ybh; Mon, 5 Aug 2019 06:54:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGUIHB1NvvyE51f9MVgTzebeQ0/PeRY7gVDciy7+WEddbUgogB0uDmZ5UA2VHQfZSFj4Yd X-Received: by 2002:a65:64c6:: with SMTP id t6mr139479966pgv.323.1565013254421; Mon, 05 Aug 2019 06:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565013254; cv=none; d=google.com; s=arc-20160816; b=SaXuGqktErMXMqA00gksNNlAGnSvD83ypP1KS2EpBe5+z+4e+q99mi5t36wJxotoKj TyZV5Ya0qe+Azm+3cfckpoy8+/HoWKJhIyTxkHwkzFLv/oi1Ldgm5zIKdlPSRYKIb2ab +JFzq3lxlrgBUbBPiLsb8Nmg97KLNjJOY2PbNurEgx9EXE04OSnCtADdUbn596we/zW7 nJO7zx0C793FIP/Q+gm6gBCfF3wSkvXARa9y3tZdh1SyoE4Ddwv5QOr+a1sZeu4LZdCz NDad9Aoz3YS4M3OSdSjEuPVK2KL9JBbNAKp2QMYk5euOTk5bNAZjjIU5GxgP/ZYiiGQW R3yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=IggGwxZBadx4sb3X+KzwYu3jb54Iw2+ffxrycv2PYcE=; b=uMaSM7NVVnLlA8GJT4GrKZ6YacONqhsTsC6v+1QlBufLG4rlPXMSgpGzfAXiPVPFuU DKEtnoZ2Z44pzwDIQdGW9aY7nmMnolbRhlBV2KojlLi+jjsEdvSNiFPjiABRRU/lGhw2 v5hmswps0BsNPfnqsLlEnKLRwT2OqttSE7AwFuuSLj8sGxlhWEWm6JxawqqnrcMShF/v jSZI4VrsNe3/MfwdUO+knRQMs6PzufbTeWhyXV2FEjdZ20zZhfczieqUz7mNqruhakcy 9EAjZK/HglITrOfRkLZ0bVGRHx8OkxFHzpYLV5umbeB8WBTPChi+pumFCnDQngq8fHR9 +Vgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si5126833pgo.588.2019.08.05.06.53.58; Mon, 05 Aug 2019 06:54:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729138AbfHENwH (ORCPT + 99 others); Mon, 5 Aug 2019 09:52:07 -0400 Received: from mga06.intel.com ([134.134.136.31]:18172 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728662AbfHENwH (ORCPT ); Mon, 5 Aug 2019 09:52:07 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2019 06:51:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,350,1559545200"; d="scan'208";a="178854881" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga006.jf.intel.com with ESMTP; 05 Aug 2019 06:51:38 -0700 Date: Mon, 5 Aug 2019 07:49:07 -0600 From: Keith Busch To: Benjamin Herrenschmidt Cc: Keith Busch , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Paul Pawlowski , Jens Axboe , Christoph Hellwig , Minwoo Im , Damien Le Moal Subject: Re: [PATCH v3] nvme-pci: Support shared tags across queues for Apple 2018 controllers Message-ID: <20190805134907.GC18647@localhost.localdomain> References: <20190730153044.GA13948@localhost.localdomain> <2030a028664a9af9e96fffca3ab352faf1f739e5.camel@kernel.crashing.org> <6290507e1b2830b1729fc858cd5c20b85d092728.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6290507e1b2830b1729fc858cd5c20b85d092728.camel@kernel.crashing.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 05, 2019 at 04:49:23PM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2019-07-30 at 13:28 -0700, Benjamin Herrenschmidt wrote: > > > One problem is that we've an nvme parameter, io_queue_depth, that a user > > > could set to something less than 32, and then you won't be able to do > > > any IO. I'd recommend enforce the admin queue to QD1 for this device so > > > that you have more potential IO tags. > > > > So I had a look and it's not that trivial. I would have to change > > a few things that use constants for the admin queue depth, such as > > the AEN tag etc... > > > > For such a special case, I am tempted instead to do the much simpler: > > > > if (dev->ctrl.quirks & NVME_QUIRK_SHARED_TAGS) { > > if (dev->q_depth < (NVME_AQ_DEPTH + 2)) > > dev->q_depth = NVME_AQ_DEPTH + 2; > > } > > > > In nvme_pci_enable() next to the existing q_depth hackery for other > > controllers. > > > > Thoughts ? > > Ping ? I had another look today and I don't feel like mucking around > with all the AQ size logic, AEN magic tag etc... just for that sake of > that Apple gunk. I'm happy to have it give up IO tags, it doesn't seem > to make much of a difference in practice anyway. > > But if you feel strongly about it, then I'll implement the "proper" way > sometimes this week, adding a way to shrink the AQ down to something > like 3 (one admin request, one async event (AEN), and the empty slot) > by making a bunch of the constants involved variables instead. I don't feel too strongly about it. I think your patch is fine, so Acked-by: Keith Busch