[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 9 Sep 2022 18:46:47 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Cheng Li <lic121@...natelecom.cn>
Cc: mike.kravetz@...cle.com, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] mm: use nth_page instead of mem_map_offset
mem_map_next
On Fri, Sep 09, 2022 at 07:31:09AM +0000, Cheng Li wrote:
> To handle discontiguity case, mem_map_next() has a parameter named
> `offset`. As a function caller, one would be confused why "get
> next entry" needs a parameter named "offset". The other drawback of
> mem_map_next() is that the callers must take care of the map between
> parameter "iter" and "offset", otherwise we may get an hole or
> duplication during iteration. So we use nth_page instead of
> mem_map_next.
>
> And replace mem_map_offset with nth_page() per Matthew's comments.
>
> Signed-off-by: Cheng Li <lic121@...natelecom.cn>
> Fixes: 69d177c2fc70 ("hugetlbfs: handle pages higher order than MAX_ORDER")
Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>
Powered by blists - more mailing lists