Messages in this thread | | | Date | Wed, 28 Sep 2005 23:10:29 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH 2/3 htlb-fault] Demand faulting for huge pages |
| |
Adam Litke <agl@us.ibm.com> wrote: > > +int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, > + unsigned long address, int write_access) > +{ > + pte_t *ptep; > + int rc = VM_FAULT_MINOR; > + > + spin_lock(&mm->page_table_lock); > + > + ptep = huge_pte_alloc(mm, address); > + if (!ptep) { > + rc = VM_FAULT_SIGBUS; > + goto out; > + } > + if (pte_none(*ptep)) > + rc = hugetlb_pte_fault(mm, vma, address, write_access); > +out: > + if (rc == VM_FAULT_MINOR) > + flush_tlb_page(vma, address); > + > + spin_unlock(&mm->page_table_lock); > + return rc; > +}
label `out' can be moved down a couple of lines.
- 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/
| |