Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbWEJTsA (ORCPT ); Wed, 10 May 2006 15:48:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751498AbWEJTsA (ORCPT ); Wed, 10 May 2006 15:48:00 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:10218 "EHLO e31.co.us.ibm.com") by vger.kernel.org with ESMTP id S1751341AbWEJTr7 (ORCPT ); Wed, 10 May 2006 15:47:59 -0400 Subject: Re: [RFC] Hugetlb demotion for x86 From: Dave Hansen To: Adam Litke Cc: linux-mm@kvack.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1147287400.24029.81.camel@localhost.localdomain> References: <1147287400.24029.81.camel@localhost.localdomain> Content-Type: text/plain Date: Wed, 10 May 2006 12:46:40 -0700 Message-Id: <1147290400.17933.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 913 Lines: 28 On Wed, 2006-05-10 at 13:56 -0500, Adam Litke wrote: > +install_demotion_ptes(struct mm_struct *mm, struct page *page, > + pgprot_t prot, unsigned long address) > +{ > + pgd_t *pgd; > + pud_t *pud; > + pmd_t *pmd; > + pte_t entry, *ptep; > + int pfn, i; > + > + pgd = pgd_offset(mm, address); > + pud = pud_alloc(mm, pgd, address); > + if (!pud) > + return -ENOMEM; > + pmd = pmd_alloc(mm, pud, address); > + if (!pmd) > + return -ENOMEM; That looks to be a pretty direct copy of what is already in __handle_mm_fault(). Can they be consolidated? -- Dave - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/