Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-21 Thread Michal Hocko
On Wed 21-09-16 09:32:10, Dave Hansen wrote: > On 09/21/2016 09:27 AM, Michal Hocko wrote: > > That was not my point. I wasn't very clear probably. Offlining can fail > > which shouldn't be really surprising. There might be a kernel allocation > > in the particular block which cannot be migrated so

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-21 Thread Dave Hansen
On 09/21/2016 09:27 AM, Michal Hocko wrote: > That was not my point. I wasn't very clear probably. Offlining can fail > which shouldn't be really surprising. There might be a kernel allocation > in the particular block which cannot be migrated so failures are to be > expected. I just do not see how

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-21 Thread Michal Hocko
On Wed 21-09-16 09:04:31, Dave Hansen wrote: > On 09/21/2016 05:05 AM, Michal Hocko wrote: > > On Tue 20-09-16 10:43:13, Dave Hansen wrote: > >> On 09/20/2016 08:52 AM, Rui Teng wrote: > >>> On 9/20/16 10:53 PM, Dave Hansen wrote: > >> ... > That's good, but aren't we still left with a situati

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-21 Thread Dave Hansen
On 09/21/2016 05:05 AM, Michal Hocko wrote: > On Tue 20-09-16 10:43:13, Dave Hansen wrote: >> On 09/20/2016 08:52 AM, Rui Teng wrote: >>> On 9/20/16 10:53 PM, Dave Hansen wrote: >> ... That's good, but aren't we still left with a situation where we've offlined and dissolved the _middle_ o

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-21 Thread Michal Hocko
On Tue 20-09-16 10:43:13, Dave Hansen wrote: > On 09/20/2016 08:52 AM, Rui Teng wrote: > > On 9/20/16 10:53 PM, Dave Hansen wrote: > ... > >> That's good, but aren't we still left with a situation where we've > >> offlined and dissolved the _middle_ of a gigantic huge page while the > >> head page

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-20 Thread Dave Hansen
On 09/20/2016 08:52 AM, Rui Teng wrote: > On 9/20/16 10:53 PM, Dave Hansen wrote: ... >> That's good, but aren't we still left with a situation where we've >> offlined and dissolved the _middle_ of a gigantic huge page while the >> head page is still in place and online? >> >> That seems bad. >> >

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-20 Thread Rui Teng
On 9/20/16 10:53 PM, Dave Hansen wrote: On 09/20/2016 07:45 AM, Rui Teng wrote: On 9/17/16 12:25 AM, Dave Hansen wrote: That's an interesting data point, but it still doesn't quite explain what is going on. It seems like there might be parts of gigantic pages that have PageHuge() set on tail

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-20 Thread Dave Hansen
On 09/20/2016 07:45 AM, Rui Teng wrote: > On 9/17/16 12:25 AM, Dave Hansen wrote: >> >> That's an interesting data point, but it still doesn't quite explain >> what is going on. >> >> It seems like there might be parts of gigantic pages that have >> PageHuge() set on tail pages, while other parts d

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-20 Thread Rui Teng
On 9/17/16 12:25 AM, Dave Hansen wrote: That's an interesting data point, but it still doesn't quite explain what is going on. It seems like there might be parts of gigantic pages that have PageHuge() set on tail pages, while other parts don't. If that's true, we have another bug and your patc

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-16 Thread Dave Hansen
On 09/16/2016 06:58 AM, Rui Teng wrote: > On 9/15/16 12:37 AM, Dave Hansen wrote: >> On 09/14/2016 09:33 AM, Rui Teng wrote: >> But, as far as describing the initial problem, can you explain how the >> tail pages still ended up being PageHuge()? Seems like dissolving the >> huge page should have c

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-16 Thread Rui Teng
On 9/15/16 12:37 AM, Dave Hansen wrote: On 09/14/2016 09:33 AM, Rui Teng wrote: How about return the size of page freed from dissolve_free_huge_page(), and jump such step on pfn? That would be a nice improvement. But, as far as describing the initial problem, can you explain how the tail pag

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-14 Thread Dave Hansen
On 09/14/2016 09:33 AM, Rui Teng wrote: > > How about return the size of page freed from dissolve_free_huge_page(), > and jump such step on pfn? That would be a nice improvement. But, as far as describing the initial problem, can you explain how the tail pages still ended up being PageHuge()? S

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-14 Thread Rui Teng
On 9/14/16 1:32 AM, Dave Hansen wrote: On 09/13/2016 01:39 AM, Rui Teng wrote: diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 87e11d8..64b5f81 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1442,7 +1442,7 @@ static int free_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed, static v

Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages()

2016-09-13 Thread Dave Hansen
On 09/13/2016 01:39 AM, Rui Teng wrote: > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 87e11d8..64b5f81 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -1442,7 +1442,7 @@ static int free_pool_huge_page(struct hstate *h, > nodemask_t *nodes_allowed, > static void dissolve_free_huge_page(