From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/3] KVM-userspace: add NUMA support for guests Date: Sun, 30 Nov 2008 17:38:34 +0200 Message-ID: <4932B37A.3070305@redhat.com> References: <492F1DD9.8030901@amd.com> <87fxlcxo62.fsf@basil.nowhere.org> <49318D57.6040601@redhat.com> <20081129201032.GT6703@one.firstfloor.org> <4931A77F.6050505@redhat.com> <20081130154145.GU6703@one.firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andre Przywara , kvm@vger.kernel.org To: Andi Kleen Return-path: Received: from mx2.redhat.com ([66.187.237.31]:41769 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751139AbYK3Pin (ORCPT ); Sun, 30 Nov 2008 10:38:43 -0500 In-Reply-To: <20081130154145.GU6703@one.firstfloor.org> Sender: kvm-owner@vger.kernel.org List-ID: Andi Kleen wrote: >> I don't think the first one works without the second. Calling getcpu() >> on startup is meaningless since the initial placement doesn't take the >> > > Who said anything about startup? The idea behind getcpu() is to call > it every time you allocate someting. > > Qemu only allocates on startup (though of course the kernel actually allocates the memory lazily). Please explain. When would you call getcpu() and what would you do at that time? >> This could happen completely in the kernel (not an easy task), or by >> > > There were experimental patches for tieing memory migration to cpu migration > some time ago from Lee S. > > >> having a second-level scheduler in userspace polling for cpu usage an >> rebalancing processes across numa nodes. Given that with virtualization >> you have a few long lived processes, this does not seem too difficult. >> > > I think I would prefer to fix that in the kernel. user space will never > have the full picture. > On the other hand, getting everyone happy so this can get into the kernel will be very difficult. Many workloads will lose from this; we're trying to balance both memory affinity and cpu balancing, and each workload has a different tradeoff. -- error compiling committee.c: too many arguments to function