Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbdGROaS (ORCPT ); Tue, 18 Jul 2017 10:30:18 -0400 Received: from mga05.intel.com ([192.55.52.43]:47321 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751603AbdGROaQ (ORCPT ); Tue, 18 Jul 2017 10:30:16 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,378,1496127600"; d="scan'208";a="1152714307" Date: Tue, 18 Jul 2017 10:36:17 -0400 From: Keith Busch To: okaya@codeaurora.org Cc: linux-nvme@lists.infradead.org, timur@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme: Acknowledge completion queue on each iteration Message-ID: <20170718143617.GA7613@localhost.localdomain> References: <1500330983-27501-1-git-send-email-okaya@codeaurora.org> <20170717224551.GA1496@localhost.localdomain> <6d10032c-35ec-978c-6b8f-1ab9c07adf7f@codeaurora.org> <20170717225615.GB1496@localhost.localdomain> <79413407294645f0e1252112c3435a29@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79413407294645f0e1252112c3435a29@codeaurora.org> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 657 Lines: 13 On Mon, Jul 17, 2017 at 07:07:00PM -0400, okaya@codeaurora.org wrote: > Maybe, I need to understand the design better. I was curious why completion > and submission queues were protected by a single lock causing lock > contention. Ideally the queues are tied to CPUs, so you couldn't have one thread submitting to a particular queue-pair while another thread is reaping completions from it. Such a setup wouldn't get lock contention. Some machines have so many CPUs, though, that sharing hardware queues is required. We've experimented with separate submission and completion locks for such cases, but I've never seen an improved performance as a result.