Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1047468rwr; Wed, 3 May 2023 09:29:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dn2vhu/dez+3o1Fu6uFQVsN7rIoF4yO+C1gsYU9h/5/8woIqD0LkYRkGaXdLVsI3CcvUs X-Received: by 2002:a17:903:41c7:b0:1a6:f755:a4bb with SMTP id u7-20020a17090341c700b001a6f755a4bbmr937166ple.0.1683131383504; Wed, 03 May 2023 09:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683131383; cv=none; d=google.com; s=arc-20160816; b=XchO6XRAfPnW0WuVaWxWsd4Uqzi3XlHukxha/EuojExKyg1dykQZmaHtO8FJNn8whS IhISS4WLZJUjvtwzdWhsNv797EBxXTE6wGV6fxNDp90I2JfgfLOIod28AooBQiVIUAhn GXEiDup18CbAUv/yn/7GC7AfGnRbc3yM8acSLA/rCqoWvEFmqscEWSobMIl3xttWy/D3 j96dWby7GpppIB0sFuYZya5EI9YfjW9w0RB2cPK6O7NVetCyIQsTXWMUAI4KCIr6MIrb 7u4CfXnt0iSuezivk+DBUINyo/zrIlbgblzuSoNVhBaigdb8AbZdhwcJgWuK+qKi2zz9 uTTw== 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=kjYfa7nPE5izLp7hgJ7YJ7ScK5f2ocld8Pe+x1/yV2k=; b=nn6WUspydnD+ZDzdip84tXdaapDkPjh2NF9KTVfaI+CWaZjgdT6u2PIMP2SCuDVlB6 8YSf2/JhXGLf1f5FbAzYQRkg1xCYcxAqsFW98+gY2v9rERZSS+BQPS+5/3GbQGFoJeSz mSU2ainD132SdkrZzXoc5jQto/DRhxLpAgbLFQN0YvC3N81r/jqOz5VpGhc98IJGqg5T /pdiCoh7JBB7Jzm9pHQQ2Z89Nmwbflpd6DKuneFPvL3NXSvn8hQcp4a/Q0YrSY6ZT08M 4ns+qS0TS0wXoGwC0vP/kGn98OCh7mEpzeg9yqkL3FcB0lsbBGaeEfqHJ1pGBVT/hKh5 3ENg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="KD/xvm2I"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a170902788200b001ab18eb1764si2582912pll.131.2023.05.03.09.29.29; Wed, 03 May 2023 09:29:43 -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=@kernel.org header.s=k20201202 header.b="KD/xvm2I"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229610AbjECQ3C (ORCPT + 99 others); Wed, 3 May 2023 12:29:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjECQ25 (ORCPT ); Wed, 3 May 2023 12:28:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B78114EEB for ; Wed, 3 May 2023 09:28:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5671962576 for ; Wed, 3 May 2023 16:28:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31775C433EF; Wed, 3 May 2023 16:28:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683131335; bh=kjYfa7nPE5izLp7hgJ7YJ7ScK5f2ocld8Pe+x1/yV2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KD/xvm2IaJfUw+q733dqRKA6l0lUNP2e548p36UPmy9cbsd0Kq/M0O6eXysWnFp4z WEVCli67veYPvPscSEb9t4qubPPo1BBzwv7DQ4IvkDV9VNsu+Mqw32vZbIKRyZXQW9 dqvPb5oixYCRFmXnjmMNC5E2wpNjUBU5t6he3ZXH64yGz6NSKIYs3DiojGINjkYm+V h9ZqLxPAGcQAwIlO5yYIGRmx0m6F7upnhFKsBEBlXWPaT/lPxhR7i3JPTNwHBfoigI HgVjVDFHCNpQbnsE1NvaqiNWpFQsJxBVl9r3pZSBn5runtEUS3JuMB5oUS0GrmkvDu APmpR1sNVOxEg== Date: Wed, 3 May 2023 10:28:53 -0600 From: Keith Busch To: jiweisun126@126.com Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, axboe@fb.com, hch@lst.de, sagi@grimberg.me, ahuang12@lenovo.com, sunjw10@lenovo.com Subject: Re: [PATCH] nvme: add cond_resched() to nvme_complete_batch() Message-ID: References: <20230502125412.65633-1-jiweisun126@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230502125412.65633-1-jiweisun126@126.com> X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 Tue, May 02, 2023 at 08:54:12PM +0800, jiweisun126@126.com wrote: > According to the above two logs, we can know the nvme_irq() cost too much > time, in the above case, about 4.8 second. And we can also know that the > main bottlenecks is in the competition for the spin lock pool->lock. I have a fix that makes pool->lock critical section much shorter and constant time. It was staged in mm tree for months, but mysteriously it's missing...