Re: [v3][PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-18 Thread Mel Gorman
On Fri, Nov 15, 2013 at 02:55:53PM -0800, Dave Hansen wrote: > > Changes from v2: > * > Changes from v1: > * removed explicit might_sleep() in favor of the one that we >get from the cond_resched(); > > -- > > From: Dave Hansen > > Right now, the migration code in migrate_page_copy() use

[v3][PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-15 Thread Dave Hansen
Changes from v2: * Changes from v1: * removed explicit might_sleep() in favor of the one that we get from the cond_resched(); -- From: Dave Hansen Right now, the migration code in migrate_page_copy() uses copy_huge_page() for hugetlbfs and thp pages: if (PageHuge(page) || PageTra

Re: [PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-15 Thread Mel Gorman
On Thu, Nov 14, 2013 at 03:34:00PM -0800, Dave Hansen wrote: > > Changes from v1: > * removed explicit might_sleep() in favor of the one that we >get from the cond_resched(); > > -- > > From: Dave Hansen > > Right now, the migration code in migrate_page_copy() uses > copy_huge_page() for

[PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-14 Thread Dave Hansen
Changes from v1: * removed explicit might_sleep() in favor of the one that we get from the cond_resched(); -- From: Dave Hansen Right now, the migration code in migrate_page_copy() uses copy_huge_page() for hugetlbfs and thp pages: if (PageHuge(page) || PageTransHuge(page))

Re: [PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-06 Thread Dave Hansen
On 11/06/2013 05:46 AM, Hillf Danton wrote: > On Tue, Oct 29, 2013 at 6:16 AM, Dave Hansen wrote: >> + >> +void copy_high_order_page(struct page *newpage, >> + struct page *oldpage, >> + int order) >> +{ >> + int i; >> + >> + might_sleep(

Re: [PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-06 Thread Hillf Danton
On Tue, Oct 29, 2013 at 6:16 AM, Dave Hansen wrote: > + > +void copy_high_order_page(struct page *newpage, > + struct page *oldpage, > + int order) > +{ > + int i; > + > + might_sleep(); > + for (i = 0; i < (1< + cond_

Re: [PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-11-05 Thread Dave Hansen
On 10/28/2013 03:11 PM, Kirill A. Shutemov wrote: > On Mon, Oct 28, 2013 at 03:16:20PM -0700, Dave Hansen wrote: >> void copy_huge_page(struct page *dst, struct page *src) >> { >> struct hstate *h = page_hstate(src); >> if (unlikely(pages_per_huge_page(h) > MAX_ORDER_NR_PAGES)) { >>

Re: [PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-10-28 Thread Kirill A. Shutemov
On Mon, Oct 28, 2013 at 03:16:20PM -0700, Dave Hansen wrote: > > From: Dave Hansen > > Right now, the migration code in migrate_page_copy() uses > copy_huge_page() for hugetlbfs and thp pages: > >if (PageHuge(page) || PageTransHuge(page)) > copy_huge_page(newpage, page)

[PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page

2013-10-28 Thread Dave Hansen
From: Dave Hansen Right now, the migration code in migrate_page_copy() uses copy_huge_page() for hugetlbfs and thp pages: if (PageHuge(page) || PageTransHuge(page)) copy_huge_page(newpage, page); So, yay for code reuse. But: void copy_huge_page(struct page *dst, struc