bmalloc: scavenger runs too much on JetStream
Created attachment 310685 [details] Patch
Attachment 310685 [details] did not pass style-queue: ERROR: Source/bmalloc/bmalloc/AsyncTask.h:129: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 310685 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=310685&action=review > Source/bmalloc/ChangeLog:28 > + One hole in this strategy is that a workload with a perfectly > + unfragmented heap that allocates and deallocates ~16kB every 2s will > + never shrink its heap. This doesn't seem to be a problem in practice. Presumably, once it reaches critical memory pressure, it will still shrink?
> Presumably, once it reaches critical memory pressure, it will still shrink? Yes.
Created attachment 311304 [details] Updated Patch Tested this on iOS. Working with Geoff, we made a few changes.
Attachment 311304 [details] did not pass style-queue: ERROR: Source/bmalloc/bmalloc/AsyncTask.h:129: More than one command on the same line [whitespace/newline] [4] ERROR: Source/bmalloc/bmalloc/Heap.cpp:204: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/bmalloc/bmalloc/Heap.cpp:209: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/bmalloc/bmalloc/Heap.cpp:212: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/bmalloc/bmalloc/Heap.cpp:223: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 5 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 311304 [details] Updated Patch r=me
Committed r217456: <http://trac.webkit.org/changeset/217456>
<rdar://problem/32479828>
It looks like this or https://bugs.webkit.org/show_bug.cgi?id=172617 is a 1.5% slowdown on JetStream on iOS.
Note that if the vm.madvise_free_debug sysctl is 1, madvise(MADV_FREE_*) will synchronously zero-fill the pages. This may result in very different performance characteristics on production vs engineering builds of the OS.