lkml.org 
[lkml]   [2022]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 2/3] hugetlb: do not update address in huge_pmd_unshare
From


On 5/28/2022 6:58 AM, Mike Kravetz wrote:
> As an optimization for loops sequentially processing hugetlb address
> ranges, huge_pmd_unshare would update a passed address if it unshared a
> pmd. Updating a loop control variable outside the loop like this is
> generally a bad idea. These loops are now using hugetlb_mask_last_hp
> to optimize scanning when non-present ptes are discovered. The same
> can be done when huge_pmd_unshare returns 1 indicating a pmd was
> unshared.
>
> Remove address update from huge_pmd_unshare. Change the passed argument
> type and update all callers. In loops sequentially processing addresses
> use hugetlb_mask_last_hp to update address if pmd is unshared.
>
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>

LGTM. Please feel free to add:
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

\
 
 \ /
  Last update: 2022-05-30 12:15    [W:0.176 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site