• Junaid Shahid's avatar
    kvm: x86: mmu: Make NX huge page recovery period configurable · 4dfe4f40
    Junaid Shahid authored
    Currently, the NX huge page recovery thread wakes up every minute and
    zaps 1/nx_huge_pages_recovery_ratio of the total number of split NX
    huge pages at a time. This is intended to ensure that only a
    relatively small number of pages get zapped at a time. But for very
    large VMs (or more specifically, VMs with a large number of
    executable pages), a period of 1 minute could still result in this
    number being too high (unless the ratio is changed significantly,
    but that can result in split pages lingering on for too long).
    
    This change makes the period configurable instead of fixing it at
    1 minute. Users of large VMs can then adjust the period and/or the
    ratio to reduce the number of pages zapped at one time while still
    maintaining the same overall duration for cycling through the
    entire list. By default, KVM derives a period from the ratio such
    that a page will remain on the list for 1 hour on average.
    Signed-off-by: default avatarJunaid Shahid <junaids@google.com>
    Message-Id: <20211020010627.305925-1-junaids@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    4dfe4f40
kernel-parameters.txt 226 KB