Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38355831rwd; Wed, 12 Jul 2023 06:41:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlHvfvv/EPSB7/MXplvOIbiK/CgeWYEANsjBj16My+dOKeWrPFwsHMNo34k4aeIhNNiJNL6z X-Received: by 2002:a17:906:6d49:b0:991:f427:2fe7 with SMTP id a9-20020a1709066d4900b00991f4272fe7mr16914441ejt.62.1689169305839; Wed, 12 Jul 2023 06:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689169305; cv=none; d=google.com; s=arc-20160816; b=PP+ygPXgi3gLl4LEv4vx2V76HziAhbMa3zd+wjtmpFPFj+tPXfSCiEafUl6oFovzHv Eo1JTvnaVS87SOX8SLtbahljH7C5JrwyenbnBJ/OaTo1nhAHJ8ryRm1Gm76efGVAZC8J VUXHssvNdDhJ2y6OlvVtpii26W+nzjFM4KQpKONzomPBNCtPBwpS6h391v5CxW1hZwy4 CF5AQ1ZkKHE8/9oXB2tdf7LNNMYsViMlsDr1hizYd7RsF77OhdoiYkctiC8LjL2x1yTO IquA23FWEtTaytQVGIYJds2XHbbAEEcp7LPr88TW4kfXoG0xZOYHhX3r/awQ8XkWC7in c5LQ== 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=WNk+/jdHxPnVKST0gawS4+1QHywyN8OFBji/tGU56o0=; fh=WVTThf+mQ8L87s1h/JL6Q4Bz8R8Ti50dC541AYkhojo=; b=XYYq2dMB+GPxC3s3apj6wMuSqoPUyZLJBcHwjPk9lWfXA0t9HEMFfl4591IAMFqK/b V1jeKaDWb2LYSuO+Q0FoOssnT9PS1qhodsidoVhGi6UXaumgdA/upzFMIYK1Td0oEXeA Iol8Gllm5cT+tVpD4aFf2lk/CcaalG3a5td6SVQxMa/LKwZto/5AR6L5Rpb2D5dEJbKX JCgjuPaNJnCbmdvcUB5qC+DjEu8Br/Ifc+uB16kEW1tZHIk48M0N0hWTgMF8EVnXTTiY 3qg6mmG5cCaFrJ/77dApNpUfEnKiWEY8NJz6Swtet3WrzBL1xQPndlJZ6T+EGJyKZuYc 2UwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ha6n/gJz"; 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 v19-20020a1709061dd300b009928b4e3b9csi4625510ejh.312.2023.07.12.06.41.21; Wed, 12 Jul 2023 06:41:45 -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="ha6n/gJz"; 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 S231913AbjGLNcd (ORCPT + 99 others); Wed, 12 Jul 2023 09:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231367AbjGLNcc (ORCPT ); Wed, 12 Jul 2023 09:32:32 -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 6518BC0 for ; Wed, 12 Jul 2023 06:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689168708; 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=WNk+/jdHxPnVKST0gawS4+1QHywyN8OFBji/tGU56o0=; b=ha6n/gJzfmCRCLFQb4nnfROtcDLIk4eDMFQ/lhYWAtjC+A2k5c60Rp0w5vQeEEr6Ci4miP czJPT/tE3QPf/3tPjK3GR2P65R+b6cb/PHnyF5AJze+DiM9fdKUk7dqzed2XFZ7cLQPJX5 MoUEmmpfPo2ib2TkTJNG26OF5y7jWuE= Received: from mimecast-mx02.redhat.com (66.187.233.73 [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-508-N7kRTt_vM7Oce_ckz9bmmA-1; Wed, 12 Jul 2023 09:31:38 -0400 X-MC-Unique: N7kRTt_vM7Oce_ckz9bmmA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D8CE2834771; Wed, 12 Jul 2023 13:31:37 +0000 (UTC) Received: from ovpn-8-25.pek2.redhat.com (ovpn-8-25.pek2.redhat.com [10.72.8.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4204D492B02; Wed, 12 Jul 2023 13:31:29 +0000 (UTC) Date: Wed, 12 Jul 2023 21:31:24 +0800 From: Ming Lei To: Christoph Hellwig Cc: Jens Axboe , linux-nvme@lists.infradead.org, "Martin K . Petersen" , linux-scsi@vger.kernel.org, linux-block@vger.kernel.org, Wen Xiong , Keith Busch , Thomas Gleixner , linux-kernel@vger.kernel.org, ming.lei@redhat.com Subject: Re: [PATCH 1/8] blk-mq: add blk_mq_max_nr_hw_queues() Message-ID: References: <20230712125455.1986455-1-ming.lei@redhat.com> <20230712125455.1986455-2-ming.lei@redhat.com> <20230712130017.GA12417@lst.de> <20230712131925.GA14596@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230712131925.GA14596@lst.de> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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=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 Wed, Jul 12, 2023 at 03:19:25PM +0200, Christoph Hellwig wrote: > On Wed, Jul 12, 2023 at 09:16:11PM +0800, Ming Lei wrote: > > The problem is that blk_mq_alloc_tag_set() forces to set nr_hw_queues > > as 1 for kdump kernel, that is why blk_mq_max_nr_hw_queues() has to > > return 1 for kdump kernel. > > Well, let's fix that first and work from there. Same argument against > that deep magic applies there as well. In short, driver needs to figure out nr_hw_queues first by hardware info, then pass it to blk_mq_alloc_tag_set(), but blk_mq_alloc_tag_set() changes it, so inconsistency is caused. The only solution in this way is to tell driver the max supported number from the beginning, that is what this patchset is doing. > > > Thomas, can we disable managed irq for kdump kernel and switch to > > non-managed irq? Then we can avoid driver's change. I'd suggest > > this way if it is possible. > > Why the heck would we? IMO irq kernel doesn't make sense in kdump kernel, which is very resource limited and has to be reliable. PCI_IRQ_AFFINITY can be just one hint, pci_alloc_irq_vectors_affinity() still allocates affinity in managed way, then queue mapping can work just fine, and the only difference is that genirq handles this irqs as non-manged wrt. migration. This way should solve queue mapping issue, but driver still allocates lots of queues, which take resource useless. So looks we still have to fix drivers. Thanks, Ming