]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: use kmalloc() for small dirty bitmaps
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Mon, 1 Nov 2010 05:36:09 +0000 (14:36 +0900)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:28:48 +0000 (11:28 +0200)
commite752d4c82552bc84957779faa3fe2689f2d104c9
tree335deee0e2351cdde480460200162dc055ef717e
parent9ebd29f584c58d59fabe4404026b32b6e59f2157
KVM: use kmalloc() for small dirty bitmaps

Currently we are using vmalloc() for all dirty bitmaps even if
they are small enough, say less than K bytes.

We use kmalloc() if dirty bitmap size is less than or equal to
PAGE_SIZE so that we can avoid vmalloc area usage for VGA.

This will also make the logging start/stop faster.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
virt/kvm/kvm_main.c