Mercurial > illumos > illumos-gate
changeset 4325:bf0932baf75c
6466149 Long ph_mutex[] holdtimes in page_hashout() mediated by vph_mutex holds in vpn_vplist_dirty
author | qiao |
---|---|
date | Fri, 25 May 2007 09:06:14 -0700 |
parents | 696de332c6cf |
children | 3c27e4b80d13 |
files | usr/src/uts/common/vm/page.h usr/src/uts/common/vm/page_lock.c |
diffstat | 2 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/vm/page.h Fri May 25 07:26:17 2007 -0700 +++ b/usr/src/uts/common/vm/page.h Fri May 25 09:06:14 2007 -0700 @@ -539,6 +539,18 @@ * shifting/summing are fast register to register operations with no additional * memory references). */ +#if defined(_LP64) + +#if NCPU < 4 +#define PH_TABLE_SIZE 128 +#define VP_SHIFT 7 +#else +#define PH_TABLE_SIZE 1024 +#define VP_SHIFT 9 +#endif + +#else /* 32 bits */ + #if NCPU < 4 #define PH_TABLE_SIZE 16 #define VP_SHIFT 7 @@ -547,6 +559,8 @@ #define VP_SHIFT 9 #endif +#endif /* _LP64 */ + /* * The amount to use for the successive shifts in the hash function below. * The actual value is LOG2(PH_TABLE_SIZE), so that as many bits as
--- a/usr/src/uts/common/vm/page_lock.c Fri May 25 07:26:17 2007 -0700 +++ b/usr/src/uts/common/vm/page_lock.c Fri May 25 09:06:14 2007 -0700 @@ -131,7 +131,11 @@ * XX64 VPH_TABLE_SIZE and VP_HASH_FUNC might break in 64 bit world. * Need to review again. */ +#if defined(_LP64) +#define VPH_TABLE_SIZE (1 << (VP_SHIFT + 3)) +#else /* 32 bits */ #define VPH_TABLE_SIZE (2 << VP_SHIFT) +#endif #define VP_HASH_FUNC(vp) \ ((((uintptr_t)(vp) >> 6) + \