Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-09 Thread Huang, Ying
Hi, Andrew, Andrew Morton writes: > On Mon, 7 Aug 2017 15:21:31 +0800 "Huang, Ying" wrote: > >> From: Huang Ying >> >> Huge page helps to reduce TLB miss rate, but it has higher cache >> footprint, sometimes this may cause some issue. For example, when >> clearing huge page on x86_64 platfo

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-09 Thread Andrew Morton
On Mon, 7 Aug 2017 15:21:31 +0800 "Huang, Ying" wrote: > From: Huang Ying > > Huge page helps to reduce TLB miss rate, but it has higher cache > footprint, sometimes this may cause some issue. For example, when > clearing huge page on x86_64 platform, the cache footprint is 2M. But > on a Xe

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-08 Thread Huang, Ying
Matthew Wilcox writes: > On Mon, Aug 07, 2017 at 03:21:31PM +0800, Huang, Ying wrote: >> @@ -2509,7 +2509,8 @@ enum mf_action_page_type { >> #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) >> extern void clear_huge_page(struct page *page, >> unsign

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-08 Thread Matthew Wilcox
On Mon, Aug 07, 2017 at 03:21:31PM +0800, Huang, Ying wrote: > @@ -2509,7 +2509,8 @@ enum mf_action_page_type { > #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS) > extern void clear_huge_page(struct page *page, > unsigned long addr, > -

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-08 Thread Huang, Ying
"Huang, Ying" writes: > "Kirill A. Shutemov" writes: > >> On Mon, Aug 07, 2017 at 03:21:31PM +0800, Huang, Ying wrote: >>> From: Huang Ying >>> >>> Huge page helps to reduce TLB miss rate, but it has higher cache >>> footprint, sometimes this may cause some issue. For example, when >>> cleari

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Huang, Ying
Christopher Lameter writes: > On Mon, 7 Aug 2017, Huang, Ying wrote: > >> --- a/mm/memory.c >> +++ b/mm/memory.c >> @@ -4374,9 +4374,31 @@ void clear_huge_page(struct page *page, >> } >> >> might_sleep(); >> -for (i = 0; i < pages_per_huge_page; i++) { >> +VM_BUG_ON(clamp(addr_h

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Huang, Ying
Mike Kravetz writes: > On 08/07/2017 12:21 AM, Huang, Ying wrote: >> From: Huang Ying >> >> Huge page helps to reduce TLB miss rate, but it has higher cache >> footprint, sometimes this may cause some issue. For example, when >> clearing huge page on x86_64 platform, the cache footprint is 2M.

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Mike Kravetz
On 08/07/2017 12:21 AM, Huang, Ying wrote: > From: Huang Ying > > Huge page helps to reduce TLB miss rate, but it has higher cache > footprint, sometimes this may cause some issue. For example, when > clearing huge page on x86_64 platform, the cache footprint is 2M. But > on a Xeon E5 v3 2699 C

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Huang, Ying
Christopher Lameter writes: > On Mon, 7 Aug 2017, Huang, Ying wrote: > >> --- a/mm/memory.c >> +++ b/mm/memory.c >> @@ -4374,9 +4374,31 @@ void clear_huge_page(struct page *page, >> } >> >> might_sleep(); >> -for (i = 0; i < pages_per_huge_page; i++) { >> +VM_BUG_ON(clamp(addr_h

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Huang, Ying
"Kirill A. Shutemov" writes: > On Mon, Aug 07, 2017 at 03:21:31PM +0800, Huang, Ying wrote: >> From: Huang Ying >> >> Huge page helps to reduce TLB miss rate, but it has higher cache >> footprint, sometimes this may cause some issue. For example, when >> clearing huge page on x86_64 platform,

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Christopher Lameter
On Mon, 7 Aug 2017, Huang, Ying wrote: > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -4374,9 +4374,31 @@ void clear_huge_page(struct page *page, > } > > might_sleep(); > - for (i = 0; i < pages_per_huge_page; i++) { > + VM_BUG_ON(clamp(addr_hint, addr, addr + > +

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Kirill A. Shutemov
On Mon, Aug 07, 2017 at 03:21:31PM +0800, Huang, Ying wrote: > From: Huang Ying > > Huge page helps to reduce TLB miss rate, but it has higher cache > footprint, sometimes this may cause some issue. For example, when > clearing huge page on x86_64 platform, the cache footprint is 2M. But > on a

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Huang, Ying
Jan Kara writes: > On Mon 07-08-17 15:21:31, Huang, Ying wrote: >> From: Huang Ying >> >> Huge page helps to reduce TLB miss rate, but it has higher cache >> footprint, sometimes this may cause some issue. For example, when >> clearing huge page on x86_64 platform, the cache footprint is 2M.

Re: [PATCH -mm] mm: Clear to access sub-page last when clearing huge page

2017-08-07 Thread Jan Kara
On Mon 07-08-17 15:21:31, Huang, Ying wrote: > From: Huang Ying > > Huge page helps to reduce TLB miss rate, but it has higher cache > footprint, sometimes this may cause some issue. For example, when > clearing huge page on x86_64 platform, the cache footprint is 2M. But > on a Xeon E5 v3 2699