Re: [RFC] Hugetlb demotion for x86

From: Dave Hansen
Date: Wed May 10 2006 - 15:47:33 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/