Re: [PATCH 1/2] thp: fix anononymous page accounting in fallback path for COW of HZP
On Mon, Dec 03, 2012 at 11:14:38AM +0800, Bob Liu wrote: > On Fri, Nov 30, 2012 at 11:03 PM, Kirill A. Shutemov > wrote: > > From: "Kirill A. Shutemov" > > > > Don't forget to account newly allocated page in fallback path for > > copy-on-write of huge zero page. > > > > What about fallback path in do_huge_pmd_wp_page_fallback()? > I think we should also account newly allocated page in it. No. Normal huge pages has already accounted on fork(). See copy_huge_pmd(). Huge zero page (as 4k zero page) doesn't contribute to RSS, so we need to account the page which replaces huge zero page on COW. -- Kirill A. Shutemov signature.asc Description: Digital signature
Re: [PATCH 1/2] thp: fix anononymous page accounting in fallback path for COW of HZP
On Fri, Nov 30, 2012 at 11:03 PM, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > Don't forget to account newly allocated page in fallback path for > copy-on-write of huge zero page. > What about fallback path in do_huge_pmd_wp_page_fallback()? I think we should also account newly allocated page in it. > Signed-off-by: Kirill A. Shutemov > --- > mm/huge_memory.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 57f0024..9d6f521 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -1164,6 +1164,7 @@ static int do_huge_pmd_wp_zero_page_fallback(struct > mm_struct *mm, > pmd_populate(mm, pmd, pgtable); > spin_unlock(&mm->page_table_lock); > put_huge_zero_page(); > + inc_mm_counter(mm, MM_ANONPAGES); > > mmu_notifier_invalidate_range_end(mm, mmun_start, mmun_end); > > -- > 1.7.11.7 > -- Regards, --Bob -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] thp: fix anononymous page accounting in fallback path for COW of HZP
From: "Kirill A. Shutemov" Don't forget to account newly allocated page in fallback path for copy-on-write of huge zero page. Signed-off-by: Kirill A. Shutemov --- mm/huge_memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 57f0024..9d6f521 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1164,6 +1164,7 @@ static int do_huge_pmd_wp_zero_page_fallback(struct mm_struct *mm, pmd_populate(mm, pmd, pgtable); spin_unlock(&mm->page_table_lock); put_huge_zero_page(); + inc_mm_counter(mm, MM_ANONPAGES); mmu_notifier_invalidate_range_end(mm, mmun_start, mmun_end); -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/