Re: [PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-13 Thread Oscar Salvador
On Wed, Feb 13, 2019 at 01:33:39PM +0100, Michal Hocko wrote: > Why isn't our check in has_unmovable_pages sufficient? Taking a closer look, it should be enough. I was mainly confused by the fact that if the zone is ZONE_MOVABLE, we do not keep checking in has_unmovable_pages(): if

Re: [PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-13 Thread Michal Hocko
On Wed 13-02-19 09:13:14, Oscar Salvador wrote: > On Tue, Feb 12, 2019 at 04:13:05PM -0800, Mike Kravetz wrote: > > Well, commit 94310cbcaa3c ("mm/madvise: enable (soft|hard) offline of > > HugeTLB pages at PGD level") should have allowed migration of gigantic > > pages. I believe it was added

Re: [PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-13 Thread Oscar Salvador
On Tue, Feb 12, 2019 at 04:13:05PM -0800, Mike Kravetz wrote: > Well, commit 94310cbcaa3c ("mm/madvise: enable (soft|hard) offline of > HugeTLB pages at PGD level") should have allowed migration of gigantic > pages. I believe it was added for 16GB pages on powerpc. However, due > to subsequent

Re: [PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-12 Thread Mike Kravetz
On 2/12/19 6:40 AM, Michal Hocko wrote: > On Tue 12-02-19 14:45:49, Oscar Salvador wrote: >> On Tue, Feb 12, 2019 at 09:33:29AM +0100, Michal Hocko wrote: if (PageHuge(page)) { struct page *head = compound_head(page); - pfn =

Re: [PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-12 Thread Michal Hocko
On Tue 12-02-19 14:45:49, Oscar Salvador wrote: > On Tue, Feb 12, 2019 at 09:33:29AM +0100, Michal Hocko wrote: > > > > > > if (PageHuge(page)) { > > > struct page *head = compound_head(page); > > > - pfn = page_to_pfn(head) + (1< > >

Re: [PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-12 Thread Oscar Salvador
On Tue, Feb 12, 2019 at 09:33:29AM +0100, Michal Hocko wrote: > > > > if (PageHuge(page)) { > > struct page *head = compound_head(page); > > - pfn = page_to_pfn(head) + (1< > if (compound_order(head) > PFN_SECTION_SHIFT) { > >

Re: [PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-12 Thread Michal Hocko
On Fri 08-02-19 10:06:04, Oscar Salvador wrote: > isolate_huge_page() expects we pass the head of hugetlb page to it: > > bool isolate_huge_page(...) > { > ... > VM_BUG_ON_PAGE(!PageHead(page), page); > ... > } > > While I really cannot think of any situation where we end up

Re: [PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-11 Thread David Hildenbrand
On 08.02.19 10:06, Oscar Salvador wrote: > isolate_huge_page() expects we pass the head of hugetlb page to it: > > bool isolate_huge_page(...) > { > ... > VM_BUG_ON_PAGE(!PageHead(page), page); > ... > } > > While I really cannot think of any situation where we end up with a >

[PATCH] mm,memory_hotplug: Explicitly pass the head to isolate_huge_page

2019-02-08 Thread Oscar Salvador
isolate_huge_page() expects we pass the head of hugetlb page to it: bool isolate_huge_page(...) { ... VM_BUG_ON_PAGE(!PageHead(page), page); ... } While I really cannot think of any situation where we end up with a non-head page between hands in do_migrate_range(), let us