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

From: Matthew Wilcox
Date: Tue Oct 10 2023 - 08:27:35 EST


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().

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