From owner-svn-src-head@FreeBSD.ORG Wed Oct 10 23:28:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2AC4C48; Wed, 10 Oct 2012 23:28:58 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B4228FC08; Wed, 10 Oct 2012 23:28:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ANSwvI020977; Wed, 10 Oct 2012 23:28:58 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ANSwn0020974; Wed, 10 Oct 2012 23:28:58 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210102328.q9ANSwn0020974@svn.freebsd.org> From: Jim Harris Date: Wed, 10 Oct 2012 23:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241433 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2012 23:28:58 -0000 Author: jimharris Date: Wed Oct 10 23:28:58 2012 New Revision: 241433 URL: http://svn.freebsd.org/changeset/base/241433 Log: Put the nvme_qpair mutex on its own cacheline. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme_private.h Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Wed Oct 10 22:02:11 2012 (r241432) +++ head/sys/dev/nvme/nvme_private.h Wed Oct 10 23:28:58 2012 (r241433) @@ -88,6 +88,10 @@ MALLOC_DECLARE(M_NVME); #define NVME_TIMEOUT_IN_SEC (30) +#ifndef CACHE_LINE_SIZE +#define CACHE_LINE_SIZE (64) +#endif + struct nvme_prp_list { uint64_t prp[NVME_MAX_PRP_LIST_ENTRIES]; SLIST_ENTRY(nvme_prp_list) slist; @@ -131,8 +135,6 @@ struct nvme_qpair { int64_t num_cmds; - struct mtx lock; - struct nvme_command *cmd; struct nvme_completion *cpl; @@ -152,7 +154,10 @@ struct nvme_qpair { struct nvme_tracker **act_tr; SLIST_HEAD(, nvme_prp_list) free_prp_list; -}; + + struct mtx lock __aligned(CACHE_LINE_SIZE); + +} __aligned(CACHE_LINE_SIZE); struct nvme_namespace {