linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/huge_memory: Clean up typo when updating mmu cache
@ 2011-10-13 12:52 Hillf Danton
  2011-10-13 13:15 ` Andrea Arcangeli
  0 siblings, 1 reply; 2+ messages in thread
From: Hillf Danton @ 2011-10-13 12:52 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: Andrew Morton, Johannes Weiner, linux-mm, LKML

Hi Andrea

There are three cases of update_mmu_cache() in the file, and the case in
function collapse_huge_page() has a typo, namely the last parameter used,
which is corrected based on the other two cases.

Due to the define of update_mmu_cache by X86, the only arch that implements
THP currently, the change here has no really crystal point, but one or two
minutes of efforts could be saved for those archs that are likely to support
THP in future.

Thanks

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/mm/huge_memory.c	Sat Aug 13 11:45:14 2011
+++ b/mm/huge_memory.c	Thu Oct 13 20:07:29 2011
@@ -1906,7 +1906,7 @@ static void collapse_huge_page(struct mm
 	BUG_ON(!pmd_none(*pmd));
 	page_add_new_anon_rmap(new_page, vma, address);
 	set_pmd_at(mm, address, pmd, _pmd);
-	update_mmu_cache(vma, address, entry);
+	update_mmu_cache(vma, address, _pmd);
 	prepare_pmd_huge_pte(pgtable, mm);
 	mm->nr_ptes--;
 	spin_unlock(&mm->page_table_lock);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/huge_memory: Clean up typo when updating mmu cache
  2011-10-13 12:52 [PATCH] mm/huge_memory: Clean up typo when updating mmu cache Hillf Danton
@ 2011-10-13 13:15 ` Andrea Arcangeli
  0 siblings, 0 replies; 2+ messages in thread
From: Andrea Arcangeli @ 2011-10-13 13:15 UTC (permalink / raw)
  To: Hillf Danton; +Cc: Andrew Morton, Johannes Weiner, linux-mm, LKML

On Thu, Oct 13, 2011 at 08:52:22PM +0800, Hillf Danton wrote:
> Hi Andrea
> 
> There are three cases of update_mmu_cache() in the file, and the case in
> function collapse_huge_page() has a typo, namely the last parameter used,
> which is corrected based on the other two cases.
> 
> Due to the define of update_mmu_cache by X86, the only arch that implements
> THP currently, the change here has no really crystal point, but one or two
> minutes of efforts could be saved for those archs that are likely to support
> THP in future.

Yes, like the previous one, they make no runtime difference today, but
they may save some debug time to who's porting THP to some other arch
in the future, so it's good to clean this up, thanks.

> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> 
> --- a/mm/huge_memory.c	Sat Aug 13 11:45:14 2011
> +++ b/mm/huge_memory.c	Thu Oct 13 20:07:29 2011
> @@ -1906,7 +1906,7 @@ static void collapse_huge_page(struct mm
>  	BUG_ON(!pmd_none(*pmd));
>  	page_add_new_anon_rmap(new_page, vma, address);
>  	set_pmd_at(mm, address, pmd, _pmd);
> -	update_mmu_cache(vma, address, entry);
> +	update_mmu_cache(vma, address, _pmd);
>  	prepare_pmd_huge_pte(pgtable, mm);
>  	mm->nr_ptes--;
>  	spin_unlock(&mm->page_table_lock);

Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-13 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 12:52 [PATCH] mm/huge_memory: Clean up typo when updating mmu cache Hillf Danton
2011-10-13 13:15 ` Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).