Re: [PATCH 2/2] thp: support split page table lock

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

 



> diff --git v3.11-rc3.orig/mm/huge_memory.c v3.11-rc3/mm/huge_memory.c
> index 243e710..3cb29e1 100644
> --- v3.11-rc3.orig/mm/huge_memory.c
> +++ v3.11-rc3/mm/huge_memory.c
...
> @@ -864,14 +868,17 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
>  	pmd_t pmd;
>  	pgtable_t pgtable;
>  	int ret;
> +	spinlock_t *uninitialized_var(dst_ptl), *uninitialized_var(src_ptl);
>  
>  	ret = -ENOMEM;
>  	pgtable = pte_alloc_one(dst_mm, addr);
>  	if (unlikely(!pgtable))
>  		goto out;
>  
> -	spin_lock(&dst_mm->page_table_lock);
> -	spin_lock_nested(&src_mm->page_table_lock, SINGLE_DEPTH_NESTING);
> +	dst_ptl = huge_pmd_lockptr(dst_mm, dst_ptl);
> +	src_ptl = huge_pmd_lockptr(src_mm, src_ptl);

I found one mistake. This should be:

+	dst_ptl = huge_pmd_lockptr(dst_mm, dst_pmd);
+	src_ptl = huge_pmd_lockptr(src_mm, src_pmd);

Thanks,
Naoya Horiguchi

> +	spin_lock(dst_ptl);
> +	spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING);
>  
>  	ret = -EAGAIN;
>  	pmd = *src_pmd;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]