lkml.org 
[lkml]   [2023]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 1/6] userfaultfd: convert mfill_atomic_pte_copy() to use a folio
From
On 2023/4/7 5:31, Mike Kravetz wrote:

> On 03/31/23 17:39, Peng Zhang wrote:
>> From: ZhangPeng <zhangpeng362@huawei.com>
>>
>> Call vma_alloc_folio() directly instead of alloc_page_vma() and convert
>> page_kaddr to kaddr in mfill_atomic_pte_copy(). Removes several calls to
>> compound_head().
>>
>> Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
>> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
>> ---
>> mm/userfaultfd.c | 33 +++++++++++++++++----------------
>> 1 file changed, 17 insertions(+), 16 deletions(-)
> Looks good,
>
> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
>
>> } else {
>> - page = *pagep;
>> + folio = page_folio(*pagep);
>> + VM_BUG_ON_FOLIO(folio_test_large(folio), folio);
>> *pagep = NULL;
>> }
> However, I am still unsure about the reason for adding the VM_BUG_ON_FOLIO
> here.

VM_BUG_ON_FOLIO was added to ensure that folio is a single-page folio.
However, the folio corresponding to the foliop is always a single-page
folio. We just don't need this check. I'll drop VM_BUG_ON_FOLIO.

Thanks for your review.

Best Regards,
Peng

\
 
 \ /
  Last update: 2023-04-08 06:44    [W:0.079 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site