Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2012 23:28:58 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241433 - head/sys/dev/nvme
Message-ID:  <201210102328.q9ANSwn0020974@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 {
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210102328.q9ANSwn0020974>