RESOLVED FIXED 113662
Regions should be allocated from the same contiguous segment of virtual memory
https://bugs.webkit.org/show_bug.cgi?id=113662
Summary Regions should be allocated from the same contiguous segment of virtual memory
Mark Hahnenberg
Reported 2013-03-31 09:20:03 PDT
Instead of letting the OS spread our Regions all over the place, we should allocate them all within some range of each other. This change will open the door to some other optimizations, e.g. doing simple range checks for our write barriers and compressing JSCell pointers to 32-bits. We can do this by having a SuperRegion for each BlockAllocator (i.e. per-VM) which subclasses MetaAllocator along the lines of the FixedVMPoolExecutableAllocator we use for the JIT.
Attachments
Patch (34.02 KB, patch)
2013-03-31 20:49 PDT, Mark Hahnenberg
no flags
Patch (33.98 KB, patch)
2013-03-31 21:13 PDT, Mark Hahnenberg
fpizlo: review+
eflews.bot: commit-queue-
Mark Hahnenberg
Comment 1 2013-03-31 20:49:43 PDT
Mark Hahnenberg
Comment 2 2013-03-31 20:51:47 PDT
(In reply to comment #1) > Created an attachment (id=195921) [details] > Patch This patch is actually a slight speedup on some benchmarks.
Mark Hahnenberg
Comment 3 2013-03-31 21:13:39 PDT
Mark Hahnenberg
Comment 4 2013-03-31 21:14:28 PDT
(In reply to comment #3) > Created an attachment (id=195922) [details] > Patch Had to add more ifdefs.
Filip Pizlo
Comment 5 2013-03-31 21:16:59 PDT
Comment on attachment 195922 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195922&action=review Other than the one comment, looks good! > Source/WTF/wtf/MetaAllocator.h:67 > + WTF_EXPORT_PRIVATE MetaAllocator(size_t allocationGranule, size_t pageSize = 0); Why not say pageSize = WTF::pageSize() and then get rid of the pageSize initialization conditional inside MetaAllocator::MetaAllocator?
Mark Hahnenberg
Comment 6 2013-03-31 21:19:05 PDT
(In reply to comment #5) > (From update of attachment 195922 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=195922&action=review > > Other than the one comment, looks good! > > > Source/WTF/wtf/MetaAllocator.h:67 > > + WTF_EXPORT_PRIVATE MetaAllocator(size_t allocationGranule, size_t pageSize = 0); > > Why not say pageSize = WTF::pageSize() and then get rid of the pageSize initialization conditional inside MetaAllocator::MetaAllocator? Good call.
EFL EWS Bot
Comment 7 2013-03-31 21:57:45 PDT
Mark Hahnenberg
Comment 8 2013-04-01 08:22:11 PDT
Geoffrey Garen
Comment 10 2013-04-01 11:45:58 PDT
Comment on attachment 195922 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195922&action=review > Source/JavaScriptCore/heap/SuperRegion.cpp:34 > +const size_t SuperRegion::s_fixedHeapMemoryPoolSize = 4 * 1024 * MB; This seems a bit excessive, compared to most heaps. If the only cost of going over is a bit of performance, maybe we should make this smaller, like 1GB or 2GB.
Note You need to log in before you can comment on or make changes to this bug.