[webkit-reviews] review granted: [Bug 230124] [libpas] Update to 976f8dddfb8721095f68ce56973401a342b18cb5 and fully enable on AS : [Attachment 437793] added RAMification number to changelog

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 9 20:29:42 PDT 2021


Yusuke Suzuki <ysuzuki at apple.com> has granted Filip Pizlo <fpizlo at apple.com>'s
request for review:
Bug 230124: [libpas] Update to 976f8dddfb8721095f68ce56973401a342b18cb5 and
fully enable on AS
https://bugs.webkit.org/show_bug.cgi?id=230124

Attachment 437793: added RAMification number to changelog

https://bugs.webkit.org/attachment.cgi?id=437793&action=review




--- Comment #4 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 437793
  --> https://bugs.webkit.org/attachment.cgi?id=437793
added RAMification number to changelog

View in context: https://bugs.webkit.org/attachment.cgi?id=437793&action=review

r=me

> Source/bmalloc/ChangeLog:25
> +	   - Replace biasing and magazines with per-thread view caches. A view
cache is a bounded-size
> +	     queue of exclusive_views (i.e. pages) that is local to a thread.
Each thread has a view
> +	     cache for every segregated_size_directory that it talks to and
that has view caching
> +	     enabled. The size directories can control view cache size somewhat
dynamically (different
> +	     directories can have different size view caches). Views get
enqueued when a thread frees
> +	     the first object in the page. Views get dequeued whenever a thread
would have asked the
> +	     directory for a view but the view cache was non-empty.
> +
> +	     This change increases the efficiency of local_allocator_refill,
since pages have a longer
> +	     time to "cook" before anyone allocates from them (since the view
cache is a queue). As
> +	     well, view caches' thread-locality means that there is no locking
or contention when
> +	     accessing them. The scavenger has clever tricks for clearing out
view caches, similarly to
> +	     how it clears out local allocators (it uses thread_suspend).

Yeah, I tried using magazine in bmalloc, and the result was, thread-local one
was better (lock is not necessary, cpu-number can change relatively easily
etc.).

> Source/bmalloc/bmalloc/BPlatform.h:323
> +#if defined(BENABLE_LIBPAS) && BENABLE_LIBPAS

We can use `if BENABLE(LIBPAS)`.


More information about the webkit-reviews mailing list