On Thu, 26 Apr 2012 15:57:30 -0700 (PDT) David Rientjes <rientjes@xxxxxxxxxx> wrote: > mm->page_table_lock is hotly contested for page fault tests and isn't > necessary to do mem_cgroup_uncharge_page() in do_huge_pmd_wp_page(). > > ... > > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -968,8 +968,10 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, > spin_lock(&mm->page_table_lock); > put_page(page); > if (unlikely(!pmd_same(*pmd, orig_pmd))) { > + spin_unlock(&mm->page_table_lock); > mem_cgroup_uncharge_page(new_page); > put_page(new_page); > + goto out; > } else { > pmd_t entry; > VM_BUG_ON(!PageHead(page)); But this is on the basically-never-happens race path and will surely have no measurable benefit? -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>