Changeset 289568 in webkit


Ignore:
Timestamp:
Feb 10, 2022, 12:27:45 PM (4 years ago)
Author:
Alan Coon
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

Location:
branches/safari-613.1.16.0-branch/Source/bmalloc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613.1.16.0-branch/Source/bmalloc/ChangeLog

    r288518 r289568  
     12022-02-10  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r289145. rdar://problem/88366590
     4
     5    [libpas] Use os_unfair_lock instead of spinlock
     6    https://bugs.webkit.org/show_bug.cgi?id=236158
     7   
     8    Reviewed by Geoffrey Garen.
     9   
     10    os_unfair_lock is very fast while it can properly suspend threads.
     11    A/B test result was neutral on Speedometer2 and JetStream2. So, to
     12    reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
     13    if it is supported (if OS is Darwin).
     14   
     15    * libpas/src/libpas/pas_config.h:
     16   
     17    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     18
     19    2022-02-04  Yusuke Suzuki  <ysuzuki@apple.com>
     20
     21            [libpas] Use os_unfair_lock instead of spinlock
     22            https://bugs.webkit.org/show_bug.cgi?id=236158
     23
     24            Reviewed by Geoffrey Garen.
     25
     26            os_unfair_lock is very fast while it can properly suspend threads.
     27            A/B test result was neutral on Speedometer2 and JetStream2. So, to
     28            reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
     29            if it is supported (if OS is Darwin).
     30
     31            * libpas/src/libpas/pas_config.h:
     32
    1332022-01-24  Alan Coon  <alancoon@apple.com>
    234
  • branches/safari-613.1.16.0-branch/Source/bmalloc/libpas/src/libpas/pas_config.h

    r288518 r289568  
    100100#define PAS_ALLOCATOR_INDEX_BYTES        4
    101101
    102 #ifdef PAS_BMALLOC
     102#if PAS_OS(DARWIN)
     103#define PAS_USE_SPINLOCKS                0
     104#else
    103105#define PAS_USE_SPINLOCKS                1
    104 #else
    105 #define PAS_USE_SPINLOCKS                0
    106106#endif
    107107
Note: See TracChangeset for help on using the changeset viewer.