Title: [289145] trunk/Source/bmalloc
- Revision
- 289145
- Author
- [email protected]
- Date
- 2022-02-04 17:55:11 -0800 (Fri, 04 Feb 2022)
Log Message
[libpas] Use os_unfair_lock instead of spinlock
https://bugs.webkit.org/show_bug.cgi?id=236158
Reviewed by Geoffrey Garen.
os_unfair_lock is very fast while it can properly suspend threads.
A/B test result was neutral on Speedometer2 and JetStream2. So, to
reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
if it is supported (if OS is Darwin).
* libpas/src/libpas/pas_config.h:
Modified Paths
Diff
Modified: trunk/Source/bmalloc/ChangeLog (289144 => 289145)
--- trunk/Source/bmalloc/ChangeLog 2022-02-05 00:51:35 UTC (rev 289144)
+++ trunk/Source/bmalloc/ChangeLog 2022-02-05 01:55:11 UTC (rev 289145)
@@ -1,5 +1,19 @@
2022-02-04 Yusuke Suzuki <[email protected]>
+ [libpas] Use os_unfair_lock instead of spinlock
+ https://bugs.webkit.org/show_bug.cgi?id=236158
+
+ Reviewed by Geoffrey Garen.
+
+ os_unfair_lock is very fast while it can properly suspend threads.
+ A/B test result was neutral on Speedometer2 and JetStream2. So, to
+ reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
+ if it is supported (if OS is Darwin).
+
+ * libpas/src/libpas/pas_config.h:
+
+2022-02-04 Yusuke Suzuki <[email protected]>
+
[libpas] allocation failure crash should be PAS_NEVER_INLINE
https://bugs.webkit.org/show_bug.cgi?id=236164
Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_config.h (289144 => 289145)
--- trunk/Source/bmalloc/libpas/src/libpas/pas_config.h 2022-02-05 00:51:35 UTC (rev 289144)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_config.h 2022-02-05 01:55:11 UTC (rev 289145)
@@ -99,10 +99,10 @@
#define PAS_ALLOCATOR_INDEX_BYTES 4
-#ifdef PAS_BMALLOC
+#if PAS_OS(DARWIN)
+#define PAS_USE_SPINLOCKS 0
+#else
#define PAS_USE_SPINLOCKS 1
-#else
-#define PAS_USE_SPINLOCKS 0
#endif
#endif /* PAS_CONFIG_H */
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes