diff options
| author | Michael Corcoran <Michael.Corcoran@Sun.COM> | 2010-04-16 16:34:51 -0700 |
|---|---|---|
| committer | Michael Corcoran <Michael.Corcoran@Sun.COM> | 2010-04-16 16:34:51 -0700 |
| commit | 23d9e5ac1800241d2b06a5418bd3fdc6ec3b48b5 (patch) | |
| tree | 2523c5b99667b7092fb39adda66f5e816a9ff17f /usr/src/uts/sun4u | |
| parent | 85bcc4e57d6d451b2647973b01b8ab11c489351a (diff) | |
| download | illumos-joyent-23d9e5ac1800241d2b06a5418bd3fdc6ec3b48b5.tar.gz | |
6322069 Unscalability of AH_LOCK_SIZE causes anonhash_lock contention on larger systems
Diffstat (limited to 'usr/src/uts/sun4u')
| -rw-r--r-- | usr/src/uts/sun4u/sys/machparam.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/usr/src/uts/sun4u/sys/machparam.h b/usr/src/uts/sun4u/sys/machparam.h index df9b11b794..e60d02a2cc 100644 --- a/usr/src/uts/sun4u/sys/machparam.h +++ b/usr/src/uts/sun4u/sys/machparam.h @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1988 AT&T */ @@ -29,8 +28,6 @@ #ifndef _SYS_MACHPARAM_H #define _SYS_MACHPARAM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -80,6 +77,32 @@ extern "C" { #endif #endif /* _STARFIRE && !lint */ +#if (NCPU <= 1) +#define NCPU_LOG2 0 +#elif (NCPU <= 2) +#define NCPU_LOG2 1 +#elif (NCPU <= 4) +#define NCPU_LOG2 2 +#elif (NCPU <= 8) +#define NCPU_LOG2 3 +#elif (NCPU <= 16) +#define NCPU_LOG2 4 +#elif (NCPU <= 32) +#define NCPU_LOG2 5 +#elif (NCPU <= 64) +#define NCPU_LOG2 6 +#elif (NCPU <= 128) +#define NCPU_LOG2 7 +#elif (NCPU <= 256) +#define NCPU_LOG2 8 +#elif (NCPU <= 512) +#define NCPU_LOG2 9 +#elif (NCPU <= 1024) +#define NCPU_LOG2 10 +#else +#error "add test for larger NCPU" +#endif + /* * Maximum number of processors that we support. With CMP processors, the * portid may not be equal to cpuid. MAX_CPU_CHIPID can be defined in a |
