Re: [External] Re: [PATCH v5 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two

2020-11-22 Thread Muchun Song
On Mon, Nov 23, 2020 at 3:00 AM Matthew Wilcox wrote: > > On Fri, Nov 20, 2020 at 09:25:52AM +0100, Michal Hocko wrote: > > On Fri 20-11-20 14:43:25, Muchun Song wrote: > > > We only can free the unused vmemmap to the buddy system when the > > > size of struct page is a power of two. > > > > Can

Re: [PATCH v5 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two

2020-11-22 Thread Matthew Wilcox
On Fri, Nov 20, 2020 at 09:25:52AM +0100, Michal Hocko wrote: > On Fri 20-11-20 14:43:25, Muchun Song wrote: > > We only can free the unused vmemmap to the buddy system when the > > size of struct page is a power of two. > > Can we actually have !power_of_2 struct pages? Yes. On x86-64, if you

Re: [PATCH v5 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two

2020-11-22 Thread Mike Rapoport
On Fri, Nov 20, 2020 at 10:15:30AM +0100, David Hildenbrand wrote: > On 20.11.20 09:25, Michal Hocko wrote: > > On Fri 20-11-20 14:43:25, Muchun Song wrote: > > > We only can free the unused vmemmap to the buddy system when the > > > size of struct page is a power of two. > > > > Can we actually

Re: [External] Re: [PATCH v5 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two

2020-11-20 Thread Muchun Song
On Fri, Nov 20, 2020 at 5:16 PM David Hildenbrand wrote: > > On 20.11.20 07:43, Muchun Song wrote: > > We only can free the unused vmemmap to the buddy system when the > > size of struct page is a power of two. > > > > Signed-off-by: Muchun Song > > --- > > mm/hugetlb_vmemmap.c | 3 ++- > > 1

Re: [PATCH v5 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two

2020-11-20 Thread David Hildenbrand
On 20.11.20 07:43, Muchun Song wrote: We only can free the unused vmemmap to the buddy system when the size of struct page is a power of two. Signed-off-by: Muchun Song --- mm/hugetlb_vmemmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/hugetlb_vmemmap.c

Re: [PATCH v5 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two

2020-11-20 Thread David Hildenbrand
On 20.11.20 09:25, Michal Hocko wrote: On Fri 20-11-20 14:43:25, Muchun Song wrote: We only can free the unused vmemmap to the buddy system when the size of struct page is a power of two. Can we actually have !power_of_2 struct pages? AFAIK multiples of 8 bytes (56, 64, 72) are possible.

Re: [PATCH v5 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two

2020-11-20 Thread Michal Hocko
On Fri 20-11-20 14:43:25, Muchun Song wrote: > We only can free the unused vmemmap to the buddy system when the > size of struct page is a power of two. Can we actually have !power_of_2 struct pages? > > Signed-off-by: Muchun Song > --- > mm/hugetlb_vmemmap.c | 3 ++- > 1 file changed, 2

[PATCH v5 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two

2020-11-19 Thread Muchun Song
We only can free the unused vmemmap to the buddy system when the size of struct page is a power of two. Signed-off-by: Muchun Song --- mm/hugetlb_vmemmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c index