HomeFreeBSD

amd64 pmap: batch chunk removal in pmap_remove_pages

Description

amd64 pmap: batch chunk removal in pmap_remove_pages

pv list lock is the main bottleneck during poudriere -j 104 and
pmap_remove_pages is the most impactful consumer. It frees chunks with the lock
held even though it plays no role in correctness. Moreover chunks are often
freed in groups, sample counts during buildkernel (0-sized frees removed):

value  ------------- Distribution ------------- count
      0 |                                         0
      1 |                                         8
      2 |@@@@@@@                                  19329
      4 |@@@@@@@@@@@@@@@@@@@@@@                   58517
      8 |                                         1085
     16 |                                         71
     32 |@@@@@@@@@@                               24919
     64 |                                         899
    128 |                                         7
    256 |                                         2
    512 |                                         0

Thus:

  1. batch freeing
  2. move it past unlocking pv list

Reviewed by: alc (previous version), markj (previous version), kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21832

Details

Provenance
mjgAuthored on
Reviewer
alc
Differential Revision
D21832: amd64 pmap: batch chunk removal in pmap_remove_pages
Parents
rS352873: MFC r351802:
Branches
Unknown
Tags
Unknown