Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174273856
D58337.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
616 B
Referenced Files
None
Subscribers
None
D58337.diff
View Options
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -113,7 +113,7 @@
(td)->td_user_pri <= PRI_MAX_TIMESHARE) ?\
PRI_MAX_TIMESHARE : (td)->td_user_pri)
-#define GOLDEN_RATIO_PRIME 2654404609U
+#define GOLDEN_RATIO_32 1640531527U
#ifndef UMTX_CHAINS
#define UMTX_CHAINS 512
#endif
@@ -380,7 +380,7 @@
unsigned n;
n = (uintptr_t)key->info.both.a + key->info.both.b;
- key->hash = ((n * GOLDEN_RATIO_PRIME) >> UMTX_SHIFTS) % UMTX_CHAINS;
+ key->hash = ((n * GOLDEN_RATIO_32) >> UMTX_SHIFTS) % UMTX_CHAINS;
}
struct umtxq_chain *
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 2, 10:32 PM (5 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37638596
Default Alt Text
D58337.diff (616 B)
Attached To
Mode
D58337: umtx: use a distribution-fair multiplier for the chain hash
Attached
Detach File
Event Timeline
Log In to Comment