[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkSD/2g75i/v2VMW@casper.infradead.org>
Date: Wed, 30 Mar 2022 17:23:27 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Miaohe Lin <linmiaohe@...wei.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [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.
Powered by blists - more mailing lists