diff options
author | Peter Rival <Frank.Rival@oracle.com> | 2010-04-23 13:26:05 -0400 |
---|---|---|
committer | Peter Rival <Frank.Rival@oracle.com> | 2010-04-23 13:26:05 -0400 |
commit | cb15d5d96b3b2730714c28bfe06cfe7421758b8c (patch) | |
tree | 7fd5c3cf5bb49647be8b2eb022e8d75a7d78eab5 /usr/src/uts/common/sys/mutex.h | |
parent | 03c76a6ef5c04e818b6badeeb6155961505af45c (diff) | |
download | illumos-joyent-cb15d5d96b3b2730714c28bfe06cfe7421758b8c.tar.gz |
6778289 vm locks need to scale with the size of system (strands/memory size)
Diffstat (limited to 'usr/src/uts/common/sys/mutex.h')
-rw-r--r-- | usr/src/uts/common/sys/mutex.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usr/src/uts/common/sys/mutex.h b/usr/src/uts/common/sys/mutex.h index 5c11b4afe0..db34243dcc 100644 --- a/usr/src/uts/common/sys/mutex.h +++ b/usr/src/uts/common/sys/mutex.h @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _SYS_MUTEX_H @@ -71,6 +70,18 @@ typedef struct mutex { #ifdef _KERNEL +/* + * A padded mutex, one per 64 byte cache line. Use when false sharing is + * an issue but beware of the extra memory it uses. Consumers may want to + * consider aligning their pad_mutex_t's to a cache line boundary as well. + */ +typedef struct pad_mutex { + kmutex_t pad_mutex; +#ifdef _LP64 + char pad_pad[64 - sizeof (kmutex_t)]; +#endif +} pad_mutex_t; + #define MUTEX_HELD(x) (mutex_owned(x)) #define MUTEX_NOT_HELD(x) (!mutex_owned(x) || panicstr || quiesce_active) |