Re: [PATCH -next 4/7] mm: convert xchg_page_access_time to xchg_folio_access_time()

From: Kefeng Wang
Date: Tue Oct 10 2023 - 23:03:29 EST




On 2023/10/10 20:27, Matthew Wilcox wrote:
On Tue, Oct 10, 2023 at 02:45:41PM +0800, Kefeng Wang wrote:
Make xchg_page_access_time to take a folio, and rename it to
xchg_folio_access_time() since all callers with a folio.

You're doing this the hard way, which makes life hard for the reviewrs.

patch 1. Introduce folio->_last_cpupid
patch 2: Add

static inline int folio_xchg_access_time(struct folio *folio, int time)
{
return xchg_page_access_time(&folio->page, time);
}

patch 3-n: Convert callers
Patch n+1: Remove xchg_page_access_time(), folding it into
folio_xchg_access_time().

Ok, I will follow this way, thanks for your advise.

Similarly for page_cpupid_xchg_last / folio_cpupid_xchg_last().
(why is this not called folio_xchg_last_cpupid?)

Fine with me, will update.

Thanks.