From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e28smtp07.in.ibm.com (e28smtp07.in.ibm.com [122.248.162.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A05862C008F for ; Wed, 22 Jan 2014 16:18:39 +1100 (EST) Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Jan 2014 10:48:34 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 569E3394003F for ; Wed, 22 Jan 2014 10:48:31 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0M5IUue54460606 for ; Wed, 22 Jan 2014 10:48:30 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0M5IUE2028507 for ; Wed, 22 Jan 2014 10:48:30 +0530 From: "Aneesh Kumar K.V" To: Paul Mackerras , Alexander Graf Subject: Re: [PATCH 0/4] powernv: kvm: numa fault improvement In-Reply-To: <20140121112204.GE8265@iris.ozlabs.ibm.com> References: <1386751674-14136-1-git-send-email-pingfank@linux.vnet.ibm.com> <62DB3340-5AF7-4DA4-A790-77EE00696F57@suse.de> <20140121112204.GE8265@iris.ozlabs.ibm.com> Date: Wed, 22 Jan 2014 10:48:30 +0530 Message-ID: <87zjmoiogp.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, Liu ping fan List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Paul Mackerras writes: > On Mon, Jan 20, 2014 at 03:48:36PM +0100, Alexander Graf wrote: >> >> On 15.01.2014, at 07:36, Liu ping fan wrote: >> >> > On Thu, Jan 9, 2014 at 8:08 PM, Alexander Graf wrote: >> >> >> >> On 11.12.2013, at 09:47, Liu Ping Fan wrote: >> >> >> >>> This series is based on Aneesh's series "[PATCH -V2 0/5] powerpc: mm: Numa faults support for ppc64" >> >>> >> >>> For this series, I apply the same idea from the previous thread "[PATCH 0/3] optimize for powerpc _PAGE_NUMA" >> >>> (for which, I still try to get a machine to show nums) >> >>> >> >>> But for this series, I think that I have a good justification -- the fact of heavy cost when switching context between guest and host, >> >>> which is well known. >> >> >> >> This cover letter isn't really telling me anything. Please put a proper description of what you're trying to achieve, why you're trying to achieve what you're trying and convince your readers that it's a good idea to do it the way you do it. >> >> >> > Sorry for the unclear message. After introducing the _PAGE_NUMA, >> > kvmppc_do_h_enter() can not fill up the hpte for guest. Instead, it >> > should rely on host's kvmppc_book3s_hv_page_fault() to call >> > do_numa_page() to do the numa fault check. This incurs the overhead >> > when exiting from rmode to vmode. My idea is that in >> > kvmppc_do_h_enter(), we do a quick check, if the page is right placed, >> > there is no need to exit to vmode (i.e saving htab, slab switching) >> > >> >>> If my suppose is correct, will CCing kvm@vger.kernel.org from next version. >> >> >> >> This translates to me as "This is an RFC"? >> >> >> > Yes, I am not quite sure about it. I have no bare-metal to verify it. >> > So I hope at least, from the theory, it is correct. >> >> Paul, could you please give this some thought and maybe benchmark it? > > OK, once I get Aneesh to tell me how I get to have ptes with > _PAGE_NUMA set in the first place. :) > I guess we want patch 2, Which Liu has sent separately and I have reviewed. http://article.gmane.org/gmane.comp.emulators.kvm.powerpc.devel/8619 I am not sure about the rest of the patches in the series. We definitely don't want to numa migrate on henter. We may want to do that on fault. But even there, IMHO, we should let the host take the fault and do the numa migration instead of doing this in guest context. -aneesh