From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Date: Sun, 21 Feb 2010 15:08:54 +0000 Subject: Re: [PATCH] KVM: PPC: Allocate vcpu struct using vmalloc Message-Id: <4B814C86.2050902@redhat.com> List-Id: References: <1266578673-32254-1-git-send-email-agraf@suse.de> In-Reply-To: <1266578673-32254-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On 02/21/2010 04:50 PM, Alexander Graf wrote: > On 21.02.2010, at 13:29, Avi Kivity wrote: > > >> On 02/19/2010 01:24 PM, Alexander Graf wrote: >> >>> We used to use get_free_pages to allocate our vcpu struct. Unfortunately >>> that call failed on me several times after my machine had a big enough >>> uptime, as memory became too fragmented by then. >>> >>> Fortunately, we don't need it to be page aligned any more! We can just >>> vmalloc it and everything's great. >>> >>> >> Applied, thanks. >> >> We have the same problem in x86 (though never observed it in practice); my plan there is to split the various structure so they take less than a page. >> > That was my original idea too, but then I looked over the code again and realized that I never need to access the vcpu struct from critical sections, as we moved everything we need there to the PACA. > > I also did experience it several times on PPC. But then again, I'm fairly sure the Book3S vcpu struct is a _lot_ larger than the average x86 vcpu struct ;-). I'd need to actually measure it up, but I'm pretty sure it's> 64k. > Right, x86 is around 8k, which is the thread stack size, and if we can't allocate that we're really dead. -- error compiling committee.c: too many arguments to function