Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36134156rwd; Mon, 10 Jul 2023 18:48:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHm8pQ8iwQo6VO4rsU8WSXWtFVXQRorSEZ6ES7Hf5NIUvAhxA04l4dGydae6aUD0btd4IaW X-Received: by 2002:a05:6870:65ac:b0:1ac:f9d2:51f9 with SMTP id fp44-20020a05687065ac00b001acf9d251f9mr11256765oab.16.1689040130027; Mon, 10 Jul 2023 18:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689040129; cv=none; d=google.com; s=arc-20160816; b=yfQQmc/8DrJmp/JkhCNjL+1JRjr6Pjzkyu5u4tPmD2dgfH5Y61dKjTZrseJfLqXeq3 bA2qCyRsFt6EpBxmtH7zleI0+uqRlAIfkS75sC/7a9K1myBMmu1/9wwPuEs700l4dVwv MTrkdOH3nbA0ibgYeJOKMtjGnZfhKpZ8cX0cVf6t5ZUVP15pwh9DgZYogIM4na6Z1/s/ 1d2xBCtcAkc9qfArDbA66ghbEAqzaMBP5hpOhTLP4fsqJFJocUszxfOu8S53lpvv/OLM GcbXRAE0x2eIf3uw+5ZECoXKnAL+s0Fe6hkDCcvhmngvp0xssmebMBb2J74gzFU71vaq 1Rbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2O7OTXUeRoU92HpC9S8grafoZ034oHB9LUwzT8GPQm8=; fh=FQHX4D7uAutm5d1J9tc9lblhZbnJuMDxHslDPbrku5w=; b=lvPBHKfph2sERhnGuMkxrnvP2akMzcaykRKlV3c+iT1noLR/BgxONvkAJrZsKG5IS+ AmtOBA+JzGQSN3cN8VvnWT1dVju+G00vU9w5D/e/NwZTAg4XAOBaui/xeo4nUInXdorZ sYzbsJb0z1cdqYj6mrpmW8/pNiPRq6gIha9/O/plCbEQiTBAysoV0qFr4SS4lxI4r/03 TNQENy9hbd7edxxrlwqi8u1bZQHP8nqQZoODOheOQf/EqBz2HbFUfGFNLgm/fTJIaLXd cjxvKPQhYBWSRAe3L9w/K3SXOGYiwplfbWtGT0WocjyluJUC6vzPygJJKQ48Pj6aaPYp INYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PkbmXy9P; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a17090ab78300b00259b2afc651si7670161pjr.62.2023.07.10.18.48.38; Mon, 10 Jul 2023 18:48:49 -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=@redhat.com header.s=mimecast20190719 header.b=PkbmXy9P; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbjGKBeZ (ORCPT + 99 others); Mon, 10 Jul 2023 21:34:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGKBeY (ORCPT ); Mon, 10 Jul 2023 21:34:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5141BF9 for ; Mon, 10 Jul 2023 18:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689039219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2O7OTXUeRoU92HpC9S8grafoZ034oHB9LUwzT8GPQm8=; b=PkbmXy9PveE/nYKdQ7oLd5Efdjw8dBkMO7v3NfKb4P71ROLxsXKcVD0gx50o8jtXLobtnf dj52IpWOxjlzaLEwgosayaBXmQ9oprC2ZoX5gXsBa5szGZ+NA9xjW1JLLEzVBnmlLLFbFh ZKfI6dOTFXxuWzti+fti/VAmCk4THE0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-92-O6L_ttexNva64r-mu9ol2Q-1; Mon, 10 Jul 2023 21:33:34 -0400 X-MC-Unique: O6L_ttexNva64r-mu9ol2Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8616F38149A2; Tue, 11 Jul 2023 01:33:33 +0000 (UTC) Received: from ovpn-8-26.pek2.redhat.com (ovpn-8-26.pek2.redhat.com [10.72.8.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF3FBC09A09; Tue, 11 Jul 2023 01:33:24 +0000 (UTC) Date: Tue, 11 Jul 2023 09:33:18 +0800 From: Ming Lei To: Keith Busch Cc: Christoph Hellwig , Jens Axboe , linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, Wen Xiong , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au, Thomas Gleixner , ming.lei@redhat.com Subject: Re: [PATCH 2/2] nvme-pci: use blk_mq_max_nr_hw_queues() to calculate io queues Message-ID: References: <20230708020259.1343736-1-ming.lei@redhat.com> <20230708020259.1343736-3-ming.lei@redhat.com> <20230710064109.GB24519@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Mon, Jul 10, 2023 at 10:51:43AM -0600, Keith Busch wrote: > On Mon, Jul 10, 2023 at 05:14:15PM +0800, Ming Lei wrote: > > On Mon, Jul 10, 2023 at 08:41:09AM +0200, Christoph Hellwig wrote: > > > On Sat, Jul 08, 2023 at 10:02:59AM +0800, Ming Lei wrote: > > > > Take blk-mq's knowledge into account for calculating io queues. > > > > > > > > Fix wrong queue mapping in case of kdump kernel. > > > > > > > > On arm and ppc64, 'maxcpus=1' is passed to kdump command line, see > > > > `Documentation/admin-guide/kdump/kdump.rst`, so num_possible_cpus() > > > > still returns all CPUs. > > > > > > That's simply broken. Please fix the arch code to make sure > > > it does not return a bogus num_possible_cpus value for these > > > > That is documented in Documentation/admin-guide/kdump/kdump.rst. > > > > On arm and ppc64, 'maxcpus=1' is passed for kdump kernel, and "maxcpu=1" > > simply keep one of CPU cores as online, and others as offline. > > > > So Cc our arch(arm & ppc64) & kdump guys wrt. passing 'maxcpus=1' for > > kdump kernel. > > > > > setups, otherwise you'll have to paper over it in all kind of > > > drivers. > > > > The issue is only triggered for drivers which use managed irq & > > multiple hw queues. > > Is the problem that the managed interrupt sets the effective irq > affinity to an offline CPU? You mentioned observed timeouts; are you Yes, the problem is that blk-mq only creates hctx0, so nvme-pci translate it into hctx0's nvme_queue, this way is actually wrong, cause blk-mq's view on queue topo isn't same with nvme's view. > seeing the "completion polled" nvme message? Yes, "completion polled" can be observed. Meantime the warning in __irq_startup_managed() can be triggered from nvme_timeout()->nvme_poll_irqdisable()->enable_irq(). Thanks, Ming