From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH v4] powerpc: kvm: make _PAGE_NUMA take effect Date: Wed, 16 Apr 2014 14:27:38 +0200 Message-ID: <534E773A.2090909@suse.de> References: <1397550820-29993-1-git-send-email-pingfank@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , "Aneesh Kumar K.V" To: Liu Ping Fan , linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org Return-path: In-Reply-To: <1397550820-29993-1-git-send-email-pingfank@linux.vnet.ibm.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 15.04.14 10:33, Liu Ping Fan wrote: > Numa fault is a method which help to achieve auto numa balancing. > When such a page fault takes place, the page fault handler will check > whether the page is placed correctly. If not, migration should be > involved to cut down the distance between the cpu and pages. > > A pte with _PAGE_NUMA help to implement numa fault. It means not to > allow the MMU to access the page directly. So a page fault is triggered > and numa fault handler gets the opportunity to run checker. > > As for the access of MMU, we need special handling for the powernv's guest. > When we mark a pte with _PAGE_NUMA, we already call mmu_notifier to > invalidate it in guest's htab, but when we tried to re-insert them, > we firstly try to map it in real-mode. Only after this fails, we fallback > to virt mode, and most of important, we run numa fault handler in virt > mode. This patch guards the way of real-mode to ensure that if a pte is > marked with _PAGE_NUMA, it will NOT be mapped in real mode, instead, it will > be mapped in virt mode and have the opportunity to be checked with placement. > > Signed-off-by: Liu Ping Fan > Reviewed-by: Aneesh Kumar K.V Thanks, applied to for-3.15. Alex