From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755273Ab0KZSCq (ORCPT ); Fri, 26 Nov 2010 13:02:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4365 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754250Ab0KZSCp (ORCPT ); Fri, 26 Nov 2010 13:02:45 -0500 Date: Fri, 26 Nov 2010 19:01:41 +0100 From: Andrea Arcangeli To: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org Cc: Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Mel Gorman , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov Subject: Re: [PATCH 11 of 66] add pmd paravirt ops Message-ID: <20101126180141.GZ6118@random.random> References: <19e5af8e27282a543e50.1288798066@v2.random> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19e5af8e27282a543e50.1288798066@v2.random> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 03, 2010 at 04:27:46PM +0100, Andrea Arcangeli wrote: > @@ -543,6 +554,18 @@ static inline void set_pte_at(struct mm_ > PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte); > } > > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > +static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, > + pmd_t *pmdp, pmd_t pmd) > +{ > + if (sizeof(pmdval_t) > sizeof(long)) > + /* 5 arg words */ > + pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd); > + else > + PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp, pmd.pmd); > +} > +#endif > + > static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) > { > pmdval_t val = native_pmd_val(pmd); btw, I noticed the 32bit build with HIGHMEM off, paravirt on, and THP on fails without this below change (that configuration clearly has never been tested for build), so I'm merging this in the above quoted patch. diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -558,11 +558,13 @@ static inline void set_pte_at(struct mm_ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { +#if PAGETABLE_LEVELS >= 3 if (sizeof(pmdval_t) > sizeof(long)) /* 5 arg words */ pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd); else PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp, pmd.pmd); +#endif } #endif From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with SMTP id 657D48D0001 for ; Fri, 26 Nov 2010 13:02:29 -0500 (EST) Date: Fri, 26 Nov 2010 19:01:41 +0100 From: Andrea Arcangeli Subject: Re: [PATCH 11 of 66] add pmd paravirt ops Message-ID: <20101126180141.GZ6118@random.random> References: <19e5af8e27282a543e50.1288798066@v2.random> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19e5af8e27282a543e50.1288798066@v2.random> Sender: owner-linux-mm@kvack.org To: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org Cc: Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Mel Gorman , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov List-ID: On Wed, Nov 03, 2010 at 04:27:46PM +0100, Andrea Arcangeli wrote: > @@ -543,6 +554,18 @@ static inline void set_pte_at(struct mm_ > PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte); > } > > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > +static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, > + pmd_t *pmdp, pmd_t pmd) > +{ > + if (sizeof(pmdval_t) > sizeof(long)) > + /* 5 arg words */ > + pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd); > + else > + PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp, pmd.pmd); > +} > +#endif > + > static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) > { > pmdval_t val = native_pmd_val(pmd); btw, I noticed the 32bit build with HIGHMEM off, paravirt on, and THP on fails without this below change (that configuration clearly has never been tested for build), so I'm merging this in the above quoted patch. diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -558,11 +558,13 @@ static inline void set_pte_at(struct mm_ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { +#if PAGETABLE_LEVELS >= 3 if (sizeof(pmdval_t) > sizeof(long)) /* 5 arg words */ pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd); else PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp, pmd.pmd); +#endif } #endif -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org