summaryrefslogtreecommitdiff
path: root/lib/sbitmap.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2020-04-16 11:58:59 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-05-15 12:26:13 -0400
commitdd03bcaad0b1a62c8ea6297e6f2a5993c1c5cd30 (patch)
tree58a3a8e50c197261712183bccff0da1c6623303f /lib/sbitmap.c
parentc16312f4fa75e786f5748a7b721a05e6b0d761fe (diff)
KVM: X86: Force ASYNC_PF_PER_VCPU to be power of two
Forcing the ASYNC_PF_PER_VCPU to be power of two is much easier to be used rather than calling roundup_pow_of_two() from time to time. Do this by adding a BUILD_BUG_ON() inside the hash function. Another point is that generally async pf does not allow concurrency over ASYNC_PF_PER_VCPU after all (see kvm_setup_async_pf()), so it does not make much sense either to have it not a power of two or some of the entries will definitely be wasted. Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20200416155859.267366-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'lib/sbitmap.c')
0 files changed, 0 insertions, 0 deletions