[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZSlf6fPfuOo4QmDt@casper.infradead.org>
Date: Fri, 13 Oct 2023 16:19:05 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, ying.huang@...el.com,
david@...hat.com, Zi Yan <ziy@...dia.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>
Subject: Re: [PATCH -next v2 18/19] mm: use folio_xchg_last_cpupid() in
wp_page_reuse()
On Fri, Oct 13, 2023 at 04:56:02PM +0800, Kefeng Wang wrote:
> Convert to use folio_xchg_last_cpupid() in wp_page_reuse(), and remove
> page variable.
... another case where we're changing behaviour and need to argue it's
desirable.
> - /*
> - * Clear the pages cpupid information as the existing
> - * information potentially belongs to a now completely
> - * unrelated process.
> - */
> - if (page)
> - page_cpupid_xchg_last(page, (1 << LAST_CPUPID_SHIFT) - 1);
> + if (folio) {
> + VM_BUG_ON(folio_test_anon(folio) &&
> + !PageAnonExclusive(vmf->page));
> + /*
> + * Clear the pages cpupid information as the existing
s/pages/folio's/
> + * information potentially belongs to a now completely
> + * unrelated process.
> + */
> + folio_xchg_last_cpupid(folio, (1 << LAST_CPUPID_SHIFT) - 1);
> + }
Powered by blists - more mailing lists