Re: [External] Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-11 Thread Oscar Salvador
On Thu, Mar 11, 2021 at 01:16:37PM +0100, Michal Hocko wrote: > On Thu 11-03-21 18:00:09, Muchun Song wrote: > [...] > > Sorry. I am confused why you disagree with this change. > > It does not bring any disadvantages. > > Because it is adding a code which is not really necessary and which will > h

Re: [External] Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-11 Thread Muchun Song
On Thu, Mar 11, 2021 at 8:16 PM Michal Hocko wrote: > > On Thu 11-03-21 18:00:09, Muchun Song wrote: > [...] > > Sorry. I am confused why you disagree with this change. > > It does not bring any disadvantages. > > Because it is adding a code which is not really necessary and which will > have to b

Re: [External] Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-11 Thread Michal Hocko
On Thu 11-03-21 18:00:09, Muchun Song wrote: [...] > Sorry. I am confused why you disagree with this change. > It does not bring any disadvantages. Because it is adding a code which is not really necessary and which will have to be maintained. Think of future changes which would need to grow more

Re: [External] Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-11 Thread Muchun Song
On Thu, Mar 11, 2021 at 5:39 PM Michal Hocko wrote: > > On Thu 11-03-21 17:08:34, Muchun Song wrote: > > On Thu, Mar 11, 2021 at 4:55 PM Michal Hocko wrote: > > > > > > On Thu 11-03-21 15:33:20, Muchun Song wrote: > > > > On Wed, Mar 10, 2021 at 11:41 PM Michal Hocko wrote: > > > > > > > > > > O

Re: [External] Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-11 Thread Michal Hocko
On Thu 11-03-21 17:08:34, Muchun Song wrote: > On Thu, Mar 11, 2021 at 4:55 PM Michal Hocko wrote: > > > > On Thu 11-03-21 15:33:20, Muchun Song wrote: > > > On Wed, Mar 10, 2021 at 11:41 PM Michal Hocko wrote: > > > > > > > > On Mon 08-03-21 18:28:07, Muchun Song wrote: > > > > > When the "struc

Re: [External] Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-11 Thread Muchun Song
On Thu, Mar 11, 2021 at 4:55 PM Michal Hocko wrote: > > On Thu 11-03-21 15:33:20, Muchun Song wrote: > > On Wed, Mar 10, 2021 at 11:41 PM Michal Hocko wrote: > > > > > > On Mon 08-03-21 18:28:07, Muchun Song wrote: > > > > When the "struct page size" crosses page boundaries we cannot > > > > make

Re: [External] Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-11 Thread Michal Hocko
On Thu 11-03-21 15:33:20, Muchun Song wrote: > On Wed, Mar 10, 2021 at 11:41 PM Michal Hocko wrote: > > > > On Mon 08-03-21 18:28:07, Muchun Song wrote: > > > When the "struct page size" crosses page boundaries we cannot > > > make use of this feature. Let free_vmemmap_pages_per_hpage() > > > retu

Re: [External] Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-10 Thread Muchun Song
On Wed, Mar 10, 2021 at 11:41 PM Michal Hocko wrote: > > On Mon 08-03-21 18:28:07, Muchun Song wrote: > > When the "struct page size" crosses page boundaries we cannot > > make use of this feature. Let free_vmemmap_pages_per_hpage() > > return zero if that is the case, most of the functions can be

Re: [PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-10 Thread Michal Hocko
On Mon 08-03-21 18:28:07, Muchun Song wrote: > When the "struct page size" crosses page boundaries we cannot > make use of this feature. Let free_vmemmap_pages_per_hpage() > return zero if that is the case, most of the functions can be > optimized away. I am confused. Don't you check for this in e

[PATCH v18 9/9] mm: hugetlb: optimize the code with the help of the compiler

2021-03-08 Thread Muchun Song
When the "struct page size" crosses page boundaries we cannot make use of this feature. Let free_vmemmap_pages_per_hpage() return zero if that is the case, most of the functions can be optimized away. Signed-off-by: Muchun Song Reviewed-by: Miaohe Lin Reviewed-by: Oscar Salvador Tested-by: Chen