summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_hv_cma.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2013-07-02 11:15:18 +0530
committerAlexander Graf <agraf@suse.de>2013-07-08 16:21:13 +0200
commit990978e99359e1f3a843563b9f96f9dc7bb7c05a (patch)
tree6f71c3c44f428b3a325097f28008dd8576dc50f0 /arch/powerpc/kvm/book3s_hv_cma.h
parent6c45b810989d1c04194499d666f695d3f811965f (diff)
downloadlinux-990978e99359e1f3a843563b9f96f9dc7bb7c05a.tar.bz2
powerpc/kvm: Use 256K chunk to track both RMA and hash page table allocation.
Both RMA and hash page table request will be a multiple of 256K. We can use a chunk size of 256K to track the free/used 256K chunk in the bitmap. This should help to reduce the bitmap size. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv_cma.h')
-rw-r--r--arch/powerpc/kvm/book3s_hv_cma.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_cma.h b/arch/powerpc/kvm/book3s_hv_cma.h
index 788bc3b73104..655144f75fa5 100644
--- a/arch/powerpc/kvm/book3s_hv_cma.h
+++ b/arch/powerpc/kvm/book3s_hv_cma.h
@@ -14,6 +14,11 @@
#ifndef __POWERPC_KVM_CMA_ALLOC_H__
#define __POWERPC_KVM_CMA_ALLOC_H__
+/*
+ * Both RMA and Hash page allocation will be multiple of 256K.
+ */
+#define KVM_CMA_CHUNK_ORDER 18
+
extern struct page *kvm_alloc_cma(unsigned long nr_pages,
unsigned long align_pages);
extern bool kvm_release_cma(struct page *pages, unsigned long nr_pages);