]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: BOOK3S: HV: Prefer CMA region for hash page table allocation
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tue, 6 May 2014 15:54:18 +0000 (21:24 +0530)
committerAlexander Graf <agraf@suse.de>
Fri, 30 May 2014 12:26:24 +0000 (14:26 +0200)
commit0fa525d5a2f27d4a418912fe42d58212a4d329de
tree5f1708c709983a84b7c76d26a8a8b96f522c45d1
parente53ee2a46c62f48dad0e567f4c291f47a2113bdb
KVM: PPC: BOOK3S: HV: Prefer CMA region for hash page table allocation

Today when KVM tries to reserve memory for the hash page table it
allocates from the normal page allocator first. If that fails it
falls back to CMA's reserved region. One of the side effects of
this is that we could end up exhausting the page allocator and
get linux into OOM conditions while we still have plenty of space
available in CMA.

This patch addresses this issue by first trying hash page table
allocation from CMA's reserved region before falling back to the normal
page allocator. So if we run out of memory, we really are out of memory.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_64_mmu_hv.c