lkml.org 
[lkml]   [2023]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 1/6] userfaultfd: convert mfill_atomic_pte_copy() to use a folio
From
On 2023/3/31 2:02, Matthew Wilcox wrote:

> On Thu, Mar 30, 2023 at 10:02:52AM -0700, Sidhartha Kumar wrote:
>> On 3/30/23 6:40 AM, Peng Zhang wrote:
>>> From: ZhangPeng <zhangpeng362@huawei.com>
>>>
>>> Call vma_alloc_folio() directly instead of alloc_page_vma(). Add an
>>> assertion that this is a single-page folio and removes several calls to
>>> compound_head().
> There's no added assertion in this patch any more, so I'd drop that
> part of the description.

Thanks. I'll update this description.

>>> if (!*pagep) {
>>> ret = -ENOMEM;
>>> - page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, dst_vma, dst_addr);
>>> - if (!page)
>>> + folio = vma_alloc_folio(GFP_HIGHUSER_MOVABLE, 0, dst_vma, dst_addr, false);
>>> + if (!folio)
>>> goto out;
>>> - page_kaddr = kmap_local_page(page);
>>> + page_kaddr = kmap_local_folio(folio, 0);
>> Should this variable name be kept as page_kaddr or should it be changed to
>> something like folio_kaddr? kmap_local_folio() returns page_address(), so
>> maybe page_kaddr is better.
> I'd just call it 'kaddr'. Or 'addr'.

Agreed. I'll change page_kaddr to kaddr.

Thanks for your review.

Best Regards,
Peng

\
 
 \ /
  Last update: 2023-03-31 11:39    [W:0.058 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site