Re: [External] Re: [PATCH v12 04/13] mm/hugetlb: Free the vmemmap pages associated with each HugeTLB page

2021-01-14 Thread Muchun Song
On Thu, Jan 14, 2021 at 7:52 PM Oscar Salvador wrote: > > On Thu, Jan 14, 2021 at 06:54:30PM +0800, Muchun Song wrote: > > I think this approach may be only suitable for generic huge page only. > > So we can implement it only for huge page. > > > > Hi Oscar, > > > > What's your opinion about

Re: [External] Re: [PATCH v12 04/13] mm/hugetlb: Free the vmemmap pages associated with each HugeTLB page

2021-01-14 Thread Oscar Salvador
On Thu, Jan 14, 2021 at 06:54:30PM +0800, Muchun Song wrote: > I think this approach may be only suitable for generic huge page only. > So we can implement it only for huge page. > > Hi Oscar, > > What's your opinion about this? I tried something like: static void vmemmap_pte_range(pmd_t *pmd,

Re: [External] Re: [PATCH v12 04/13] mm/hugetlb: Free the vmemmap pages associated with each HugeTLB page

2021-01-14 Thread Muchun Song
On Tue, Jan 12, 2021 at 4:05 PM Oscar Salvador wrote: > > On Wed, Jan 06, 2021 at 10:19:22PM +0800, Muchun Song wrote: > > Every HugeTLB has more than one struct page structure. We __know__ that > > we only use the first 4(HUGETLB_CGROUP_MIN_ORDER) struct page structures > > to store metadata

Re: [External] Re: [PATCH v12 04/13] mm/hugetlb: Free the vmemmap pages associated with each HugeTLB page

2021-01-14 Thread Muchun Song
On Thu, Jan 14, 2021 at 7:27 AM Mike Kravetz wrote: > > On 1/13/21 1:20 AM, Oscar Salvador wrote: > > On Tue, Jan 12, 2021 at 07:33:33PM +0800, Muchun Song wrote: > >>> It seems a bit odd to only pass "start" for the BUG_ON. > >>> Also, I kind of dislike the "addr += PAGE_SIZE" in

Re: [External] Re: [PATCH v12 04/13] mm/hugetlb: Free the vmemmap pages associated with each HugeTLB page

2021-01-13 Thread Mike Kravetz
On 1/13/21 1:20 AM, Oscar Salvador wrote: > On Tue, Jan 12, 2021 at 07:33:33PM +0800, Muchun Song wrote: >>> It seems a bit odd to only pass "start" for the BUG_ON. >>> Also, I kind of dislike the "addr += PAGE_SIZE" in vmemmap_pte_range. >>> >>> I wonder if adding a ".remap_start_addr" would make

Re: [External] Re: [PATCH v12 04/13] mm/hugetlb: Free the vmemmap pages associated with each HugeTLB page

2021-01-13 Thread Oscar Salvador
On Tue, Jan 12, 2021 at 07:33:33PM +0800, Muchun Song wrote: > > It seems a bit odd to only pass "start" for the BUG_ON. > > Also, I kind of dislike the "addr += PAGE_SIZE" in vmemmap_pte_range. > > > > I wonder if adding a ".remap_start_addr" would make more sense. > > And adding it here with the

Re: [External] Re: [PATCH v12 04/13] mm/hugetlb: Free the vmemmap pages associated with each HugeTLB page

2021-01-12 Thread Muchun Song
On Tue, Jan 12, 2021 at 4:05 PM Oscar Salvador wrote: > > On Wed, Jan 06, 2021 at 10:19:22PM +0800, Muchun Song wrote: > > Every HugeTLB has more than one struct page structure. We __know__ that > > we only use the first 4(HUGETLB_CGROUP_MIN_ORDER) struct page structures > > to store metadata