Re: [PATCH 2/3 htlb-fault] Demand faulting for huge pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Litke <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux