Title: [289568] branches/safari-613.1.16.0-branch/Source/bmalloc
Revision
289568
Author
[email protected]
Date
2022-02-10 12:27:45 -0800 (Thu, 10 Feb 2022)

Log Message

Cherry-pick r289145. rdar://problem/88366590

    [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:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289145 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613.1.16.0-branch/Source/bmalloc/ChangeLog (289567 => 289568)


--- branches/safari-613.1.16.0-branch/Source/bmalloc/ChangeLog	2022-02-10 20:23:37 UTC (rev 289567)
+++ branches/safari-613.1.16.0-branch/Source/bmalloc/ChangeLog	2022-02-10 20:27:45 UTC (rev 289568)
@@ -1,3 +1,35 @@
+2022-02-10  Alan Coon  <[email protected]>
+
+        Cherry-pick r289145. rdar://problem/88366590
+
+    [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:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-01-24  Alan Coon  <[email protected]>
 
         Cherry-pick r288265. rdar://problem/87842725

Modified: branches/safari-613.1.16.0-branch/Source/bmalloc/libpas/src/libpas/pas_config.h (289567 => 289568)


--- branches/safari-613.1.16.0-branch/Source/bmalloc/libpas/src/libpas/pas_config.h	2022-02-10 20:23:37 UTC (rev 289567)
+++ branches/safari-613.1.16.0-branch/Source/bmalloc/libpas/src/libpas/pas_config.h	2022-02-10 20:27:45 UTC (rev 289568)
@@ -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

Reply via email to