svn commit: r241433 - head/sys/dev/nvme
Jim Harris
jimharris at FreeBSD.org
Wed Oct 10 23:28:58 UTC 2012
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 {
More information about the svn-src-head
mailing list