WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
204773
[bmalloc] Move Chunk object to the very end of Chunk block.
https://bugs.webkit.org/show_bug.cgi?id=204773
Summary
[bmalloc] Move Chunk object to the very end of Chunk block.
Basuke Suzuki
Reported
2019-12-02 15:58:33 PST
Currently the Chunk object data is located in the very beginning of chunk area. After this object, there are unused memory area left untouched through the life cycle of chunk area. Also in
bug 204286
, another unused area was found in the very end of it. It seems we can optimize usage of pages in chunk by moving Chunk object from beginning to end.
Attachments
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2019-12-02 16:15:27 PST
| [current implementation] | [tail Chunk] page | metadata page unused unused | page class pageSize | size count head tail | count diff unused ------------------------------------------------------------------------------------ 0 4096 | 12288 253 2024 0 | 253 0 2024 1 8192 | 16384 126 6120 0 | 126 0 6120 2 12288 | 12288 84 2024 4096 | 84 0 6120 3 16384 | 16384 63 6120 0 | 63 0 6120 4 20480 | 20480 50 10216 4096 | 50 0 14312 5 24576 | 24576 41 14312 16384 | 42 1 6120 6 28672 | 28672 35 18408 16384 | 36 1 6120 7 32768 | 32768 31 22504 0 | 31 0 22504 8 36864 | 36864 27 26600 16384 | 28 1 6120 9 40960 | 40960 24 30696 24576 | 25 1 14312 10 45056 | 45056 22 34792 12288 | 23 1 2024 11 49152 | 49152 20 38888 16384 | 21 1 6120 12 53248 | 53248 18 42984 36864 | 19 1 26600 13 57344 | 57344 17 47080 16384 | 18 1 6120 14 61440 | 61440 16 51176 4096 | 16 0 55272 15 65536 | 65536 15 55272 0 | 15 0 55272 This is a quick research. We can get extra page in pageClass of 5, 6, 8, 9, 10, 11, 12 and 13.
Basuke Suzuki
Comment 2
2019-12-02 16:15:40 PST
https://docs.google.com/spreadsheets/d/1o1hQbh-EalCJ0v_1cOXupV7R25Dz5c8RmVGqYepjN2I/edit?usp=sharing
Basuke Suzuki
Comment 3
2019-12-02 16:22:22 PST
Also unified unused memory region are easy to decommit at the beginning of chunk creation and won't be used until returned to large free. We will get additional decommittable pages like this: | decommitable page | pages class pageSize | 4k 16k ---------------------------------- 0 4096 | 0 0 1 8192 | 1 0 2 12288 | 1 0 3 16384 | 1 0 4 20480 | 3 0 5 24576 | 1 0 6 28672 | 1 0 7 32768 | 5 1 8 36864 | 1 0 9 40960 | 3 0 10 45056 | 0 0 11 49152 | 1 0 12 53248 | 6 1 13 57344 | 1 0 14 61440 | 13 3 15 65536 | 13 3
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug