https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114563

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 57858
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57858&action=edit
better release_pages

Ah, and it's not so much fragmentation but large free_unit (1MB) that's hard
to get to.  The attached sorts the pages before releasing contiguous spaces.

printing all > G.pagesize occurances yields

where the first column is the number of times (sort -n | uniq -c) and the
rest is the size of the contiguous area and in how many page entries that
is spread (I notice we don't merge the page entries either, but that would
not obviously be a good thing I guess)

      5 8192 in 1
    465 8192 in 2
    410 12288 in 3
    317 16384 in 4
    162 20480 in 5
    158 24576 in 6
    145 28672 in 7
     20 32768 in 1
     94 32768 in 8
     81 36864 in 9
     59 40960 in 10
     61 45056 in 11
     50 49152 in 12
      1 49152 in 6
     27 53248 in 13
     20 57344 in 14
     13 61440 in 15
      5 65536 in 1
     14 65536 in 16
      5 65536 in 2
      3 69632 in 17
      1 73728 in 18
      1 77824 in 19
      1 81920 in 20
      1 86016 in 21
      1 94208 in 23
      2 98304 in 2
      1 114688 in 14
      1 118784 in 29
      1 126976 in 31
      2 131072 in 1
      1 131072 in 16
      2 131072 in 3
      1 155648 in 38
      1 159744 in 39
      1 167936 in 41
      1 196608 in 2
      1 204800 in 50
      6 204800 in 7
      4 229376 in 3
      2 262144 in 1
      1 278528 in 34
      1 344064 in 42
      1 393216 in 48
      1 524288 in 1
      1 544768 in 133
      2 565248 in 138
      1 569344 in 139
      1 573440 in 140
      1 737280 in 90
      1 835584 in 204
      1 884736 in 54
      1 999424 in 61

-- below is then released
      2 1048576 in 1
      1 1048576 in 2
      1 1310720 in 65
      1 1359872 in 129
      1 1400832 in 149
      1 1597440 in 8
      1 1605632 in 392
      3 1605632 in 7
      1 1835008 in 7
      1 1867776 in 8
      1 2023424 in 494
      3 3145728 in 6
      3 3211264 in 7
      1 4194304 in 1
      1 4685824 in 319
      1 8388608 in 1
      1 8617984 in 439
      1 8896512 in 450
      1 9363456 in 297
      1 9732096 in 480
      1 9740288 in 508
      1 9764864 in 478
      1 10485760 in 2560
      2 14049280 in 616
      3 14336000 in 628
      1 16777216 in 1
      1 33554432 in 1
      1 85975040 in 1966
      1 210501632 in 3040
      1 275062784 in 3586
      1 302637056 in 1298
      1 339976192 in 3853
      1 429260800 in 2384
      1 476405760 in 4017
      1 556277760 in 3465
      1 561905664 in 4372
      1 563216384 in 4379
      1 645537792 in 5451
      1 1515700224 in 8173
      1 1524654080 in 8195
      1 1525112832 in 8196

Reply via email to