[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZCXRzfUKZUgPiscf@casper.infradead.org>
Date: Thu, 30 Mar 2023 19:15:41 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Peng Zhang <zhangpeng362@...wei.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, mike.kravetz@...cle.com,
vishal.moola@...il.com, muchun.song@...ux.dev,
sidhartha.kumar@...cle.com, wangkefeng.wang@...wei.com,
sunnanyong@...wei.com
Subject: Re: [PATCH v4 5/6] mm: convert copy_user_huge_page() to
copy_user_folio()
On Thu, Mar 30, 2023 at 09:40:44PM +0800, Peng Zhang wrote:
> +void copy_user_folio(struct folio *dst, struct folio *src,
> + unsigned long addr_hint,
> + struct vm_area_struct *vma,
> + unsigned int pages_per_huge_page);
Do we really want to pass in pages_per_huge_page here? We can get
that from folio_nr_pages(dst).
> +++ b/mm/hugetlb.c
> @@ -5097,8 +5097,8 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
> ret = PTR_ERR(new_folio);
> break;
> }
> - copy_user_huge_page(&new_folio->page, ptepage, addr, dst_vma,
> - npages);
> + copy_user_folio(new_folio, page_folio(ptepage), addr, dst_vma,
> + npages);
> put_page(ptepage);
This function should be converted to s/ptepage/pte_folio/, but that's
not for this patch series.
> - copy_user_huge_page(&new_folio->page, old_page, address, vma,
> - pages_per_huge_page(h));
> + copy_user_folio(new_folio, page_folio(old_page), address, vma,
> + pages_per_huge_page(h));
Likewise for s/old_page/old_folio/
Powered by blists - more mailing lists