lkml.org 
[lkml]   [2022]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/8] mm/vmscan: introduce helper function reclaim_page_list()
On Wed, Mar 30, 2022 at 10:04:54AM +0800, Miaohe Lin wrote:
> On 2022/3/29 21:50, Matthew Wilcox wrote:
> >> + while (!list_empty(page_list)) {
> >> + page = lru_to_page(page_list);
> >> + list_del(&page->lru);
> >> + putback_lru_page(page);
> >
> > Why wouldn't you use a folio here?
> >
>
> I was just wanting to keep the code consistent with the previous one. Am I supposed to
> use a folio here ? If so, will do it in V2.

The distinction we're trying to make (and obviously we have a long way
to go before we're finished) is between the structure that describes
PAGE_SIZE bytes of memory and the structure that manages the memory
allocation. This function is clearly handling the entire memory
allocation, so it should be using a folio. Eventually, page->lru
should disappear, but there's 180 places to figure out what we need to
do instead.

\
 
 \ /
  Last update: 2022-03-30 18:24    [W:0.097 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site