lkml.org 
[lkml]   [2023]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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);
> + }

\
 
 \ /
  Last update: 2023-10-13 17:19    [W:0.150 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site