RE: [RFC] Demand faulting for large pages

From: Chen, Kenneth W
Date: Fri Aug 05 2005 - 16:43:29 EST


Adam Litke wrote on Friday, August 05, 2005 8:22 AM
> +int hugetlb_pte_fault(struct mm_struct *mm, struct vm_area_struct *vma,
> + unsigned long address, int write_access)
> +{
> + int ret = VM_FAULT_MINOR;
> + unsigned long idx;
> + pte_t *pte;
> + struct page *page;
> + struct address_space *mapping;
> +
> + WARN_ON(!is_vm_hugetlb_page(vma));

Spurious WARN_ON. Calls to hugetlb_pte_fault() is conditioned upon
if (is_vm_hugetlb_page(vma))



> +int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
> + unsigned long address, int write_access)
> +{
> + ....
> + if (pte_none(*ptep))
> + rc = hugetlb_pte_fault(mm, vma, address, write_access);
> +}

Broken here. Return VM_FAULT_SIGBUS when *pte is present?? Why
can't you move all the logic into hugetlb_pte_fault and simply call
it directly from handle_mm_fault?

-
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/