From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E422AC433EF for ; Tue, 5 Jul 2022 00:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=i1A0DNvpOU5CiU6rMLgfvUJNzaDDHxbYayOGIRyqRYo=; b=ouyS1JJoxtY6BRNoaAVsJt33mM UHJJz+AAAV9hiPhycpCzDOQYNUWhoL8WkvJ+UGFk/dQ9zJBmEMud81ZwSeCVrkXX3MAsE0/xjVq+M x3Nh51K5d0i1ScAK9nT/hTm7cGLL4YqT9V8JCNCoRsgj8AOicbizi2Mij7LpduoPUTPOWHPWrPB8F 46n2sMoY3kLzOHyWfuV8DEA93ptE0F3y2Iz7awLhr+EEY4K6wbbB4z1S16UmtQCea+xJLJh4+sbD0 ya5ta4wZEuJ/WIsS50pcNHAJz9SiE/wFej3qtb04lGcloETr8EnT16a2ke2Y56eMopKNNZ0i4VEk3 vLBUmcVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8WlF-00DX29-Oj; Tue, 05 Jul 2022 00:49:53 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8WlC-00DWwY-TG for linux-nvme@lists.infradead.org; Tue, 05 Jul 2022 00:49:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656982187; 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=i1A0DNvpOU5CiU6rMLgfvUJNzaDDHxbYayOGIRyqRYo=; b=a18yaqKzkzf6q4oVH9vGCY8pUCZmoDdIUkJ78A7IGeFy0aXSvmDqNvp7zRsmaHqtmXosfx qPJePhl6L5FEQRrUHBR4AMM52rgpBMlRP9ylCze2LV4lyjPJnTX2h6ycJcNsdTR+lErvoH ZcryNubhcCg0sPj5KE93FgLR95vAMlY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-558-A1KXb6U8MpGM_fvL501Qjw-1; Mon, 04 Jul 2022 20:49:43 -0400 X-MC-Unique: A1KXb6U8MpGM_fvL501Qjw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4D310185A79C; Tue, 5 Jul 2022 00:49:43 +0000 (UTC) Received: from T590 (ovpn-8-22.pek2.redhat.com [10.72.8.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93DB71415309; Tue, 5 Jul 2022 00:49:39 +0000 (UTC) Date: Tue, 5 Jul 2022 08:49:33 +0800 From: Ming Lei To: Sagi Grimberg Cc: Yi Zhang , "open list:NVM EXPRESS DRIVER" , linux-block , Bart Van Assche Subject: Re: [bug report] nvme/rdma: nvme connect failed after offline one cpu on host side Message-ID: References: <2c42c70a-8eb4-a095-1d2b-139614ebd903@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c42c70a-8eb4-a095-1d2b-139614ebd903@grimberg.me> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220704_174951_055927_36367171 X-CRM114-Status: GOOD ( 20.73 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On Tue, Jul 05, 2022 at 02:04:53AM +0300, Sagi Grimberg wrote: > > > update the subject to better describe the issue: > > > > So I tried this issue on one nvme/rdma environment, and it was also > > reproducible, here are the steps: > > > > # echo 0 >/sys/devices/system/cpu/cpu0/online > > # dmesg | tail -10 > > [ 781.577235] smpboot: CPU 0 is now offline > > # nvme connect -t rdma -a 172.31.45.202 -s 4420 -n testnqn > > Failed to write to /dev/nvme-fabrics: Invalid cross-device link > > no controller found: failed to write to nvme-fabrics device > > > > # dmesg > > [ 781.577235] smpboot: CPU 0 is now offline > > [ 799.471627] nvme nvme0: creating 39 I/O queues. > > [ 801.053782] nvme nvme0: mapped 39/0/0 default/read/poll queues. > > [ 801.064149] nvme nvme0: Connect command failed, error wo/DNR bit: -16402 > > [ 801.073059] nvme nvme0: failed to connect queue: 1 ret=-18 > > This is because of blk_mq_alloc_request_hctx() and was raised before. > > IIRC there was reluctance to make it allocate a request for an hctx even > if its associated mapped cpu is offline. > > The latest attempt was from Ming: > [PATCH V7 0/3] blk-mq: fix blk_mq_alloc_request_hctx > > Don't know where that went tho... The attempt relies on that the queue for connecting io queue uses non-admined irq, unfortunately that can't be true for all drivers, so that way can't go. So far, I'd suggest to fix nvme_*_connect_io_queues() to ignore failed io queue, then the nvme host still can be setup with less io queues. Otherwise nvme_*_connect_io_queues() could fail easily, especially for 1:1 mapping. Thanks, Ming