Skip to content
  • Marc Zyngier's avatar
    kvmtool: ARM: force alignment of memory for THP · b4d9ac64
    Marc Zyngier authored
    
    
    Use of THP requires that the VMA containing the guest memory is
    2MB aligned. Unfortunately, nothing in kvmtool ensures that the
    memory is actually aligned, making the use of THP very unlikely.
    
    Just follow what we're already doing for virtio, and expand our
    forced alignment to 2M.
    
    * without this patch:
    root@muffin-man:~# for i in $(seq 1 5); do ./hackbench 50 process 1000; done
    Running with 50*40 (== 2000) tasks.
    Time: 113.600
    Running with 50*40 (== 2000) tasks.
    Time: 108.650
    Running with 50*40 (== 2000) tasks.
    Time: 110.753
    Running with 50*40 (== 2000) tasks.
    Time: 116.992
    Running with 50*40 (== 2000) tasks.
    Time: 117.317
    
    * with this patch:
    root@muffin-man:~# for i in $(seq 1 5); do ./hackbench 50 process 1000; done
    Running with 50*40 (== 2000) tasks.
    Time: 97.613
    Running with 50*40 (== 2000) tasks.
    Time: 96.111
    Running with 50*40 (== 2000) tasks.
    Time: 97.090
    Running with 50*40 (== 2000) tasks.
    Time: 100.820
    Running with 50*40 (== 2000) tasks.
    Time: 100.298
    
    Acked-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
    b4d9ac64